print 함수는 안에 인자값을 문자열로 콘솔(console)에 보여주는 함수입니다.
예시
# 단일
print(123) # 123
# 다중
print(123, 456) # 123 456
end
end 맨뒤에 들어가는 문자열을 직접 설정할 수 있습니다 기본값은 줄바꿈 개행문자(\n)가 들어갑니다.
예시
print(123, end=".") # 123.
sep
separator 다중 인자 값 사이에 들어가는 기본값은 한칸 공백으로 들어갑니다.
예시
print(123, 456, sep=",") # 123,456
Reperences
[Python3 Docs Input]: https://docs.python.org/ko/3/tutorial/inputoutput.html
7. Input and Output
There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. Fa...
docs.python.org
[Python W3schools Print]: https://www.w3schools.com/python/ref_func_print.asp
Python print() Function
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
'Programing Language > Python' 카테고리의 다른 글
[Python] 파이썬 공백제거 (0) | 2023.08.17 |
---|---|
[Python] beautifulsoup에서 HTML 가져오기 (0) | 2023.06.16 |
[Python] nonnumeric port (0) | 2023.05.30 |
[Python] Snake Case To Camel Case ( str, dict, list ) (0) | 2023.05.30 |
[Python] pydantic.error_wrappers.ValidationError (0) | 2023.05.21 |
댓글