Python 문자열 여러 줄 입력

Jmnote (토론 | 기여)님의 2023년 1월 20일 (금) 14:55 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

Python 문자열 여러 줄 입력
Python 멀티라인 문자열
s = '''Hello,
How are you?'''
print( s )
# Hello,
# How are you?
s = '''Hi,
What's up?'''
print( s )
# Hi,
# What's up?
s = """Hi,
What's up?"""
print( s )
# Hi,
# What's up?
print """Hello
My
Friend"""
print """\
Hello
My
Friend"""

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}