1、使用转义字符\n
print('jan\nfeb\nmar')
jan
feb
mar
print('this is a test%s'%'\nhappy\nbirthday')
this is a test
happy
birthday
2、三重引号
print("""i like watching tv.
do you like it too?
""")
i like watching tv.
do you like it too?
1、使用转义字符\n
print('jan\nfeb\nmar')
jan
feb
mar
print('this is a test%s'%'\nhappy\nbirthday')
this is a test
happy
birthday
2、三重引号
print("""i like watching tv.
do you like it too?
""")
i like watching tv.
do you like it too?