12. Python

[파이썬 기본편_8] 줄 바꿈

도피디 2023. 8. 22. 22:19
반응형
파이썬 줄 바꾸는 방법

 

 

  • 1번 -  \n 

 

a = 'Life is too short, \nYou need Python'
print(a)

 

출력값:

Life is too short, 
You need Python

 

 

 

 

 

 

  • 2번  - '''

 

a = '''Life is too short,
You need Python'''
print(a)

 

출력값:

Life is too short, 
You need Python

 

 

 

 

 

 

  • 3번  - """

 

a = """Life is too short,
You need Python"""
print(a)

 

출력값: 

Life is too short, 
You need Python

 

 

 

 

반응형