Skip to content

출력

print() 함수에 대한 내용은 다음과 같다.

sh
print(...)
    print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
    
    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments:
    file:  a file-like object (stream); defaults to the current sys.stdout.
    sep:   string inserted between values, default a space.
    end:   string appended after the last value, default a newline.
    flush: whether to forcibly flush the stream.
  • sep=' ': print() 함수에서 출력하는 값들을 구분자(seperator)에 의해 띄어쓰기를 할 때 사용
  • end='\n': 문장을 출력하고 마지막에 어떤 내용을 출력할 때 사용

다음 페이지에서 print() 함수의 기능을 알아보자

Powered by vitepress-logo-mini