"Python 문자열 여러 줄 입력"의 두 판 사이의 차이

9번째 줄: 9번째 줄:
# Hello,
# Hello,
# How are you?
# How are you?
</source>
<source lang='python'>
s = """Hi,
What's up?"""
print( s )
# Hi,
# What's up?
</source>
</source>
<source lang='python'>
<source lang='python'>

2017년 12월 6일 (수) 14:52 판

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?
print """Hello
My
Friend"""
print """\
Hello
My
Friend"""

2 같이 보기

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