課程
/后端開發
/Python
/初識Python
s = 'Python was started in 1989 by \"Guido\".
? ? Python is free and easy to learn.'
print s
2018-07-19
源自:初識Python 3-5
正在回答
不是空行的問題,多行字符串用'''...'''表示,如3.6版本中(輸出多了個括號)
'''...'''
s = '''Python was started in 1989 by \"Guido\".
? ? Python is free and easy to learn.'''
print (s)
芃芃其麥 提問者
'Python was started in 1989 by \"Guido\".\n\nPython is free and easy to learn.' ?這樣寫 就可以空行了
你這是多行的字符串,需要用''' ? ?''' ?來表示多行
python對格式要求滿嚴格的
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-07-19
不是空行的問題,多行字符串用
'''...'''
表示,如3.6版本中(輸出多了個括號)s = '''Python was started in 1989 by \"Guido\".
? ? Python is free and easy to learn.'''
print (s)
2018-07-19
'Python was started in 1989 by \"Guido\".\n\nPython is free and easy to learn.' ?這樣寫 就可以空行了
2018-07-19
你這是多行的字符串,需要用''' ? ?''' ?來表示多行
2018-07-19
python對格式要求滿嚴格的