Python 코드 여러 줄로 작성

1 개요[ | ]

Python 코드 여러 줄로 작성
  • 역슬래시를 사용하여 여러줄로 분할할 수 있다.
s = "Hello, " + "my friend. " + "Stay awhile and listen..." 
print( s )
s = "Hello, "\
    + "my friend. "\
    + "Stay awhile and listen..." 
print( s )

2 같이 보기[ | ]

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