为了账号安全,请及时绑定邮箱和手机立即绑定

python转义字符串问题

s = 'Python was started in 1989 by \"Guido\".\n

Python is free and easy to learn.'

print s

想不通为啥就是不对,无法通过(python的定义字符串)


正在回答

5 回答

s = 'Python was started in 1989 by \"Guido\".\nPython is free and easy to learn.'

print s


0 回复 有任何疑惑可以回复我~

python对空格检查很严格,两个字符串之间不能直接回车

0 回复 有任何疑惑可以回复我~

额,大哥们,我是想问原因,不是要你们重打一遍,

0 回复 有任何疑惑可以回复我~

s = 'Python was started in 1989 by "Guido".\n Python is free and easy to learn.'

print s


0 回复 有任何疑惑可以回复我~
s = 'Python was started in 1989 by "Guido".\n
Python is free and easy to learn.'
print s


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
初识Python
  • 参与学习       758277    人
  • 解答问题       8967    个

学python入门视频教程,让你快速入门并能编写简单的Python程序

进入课程

python转义字符串问题

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号