您的位置:首页 > 编程语言 > Python开发

Python学习14:如何把Python代码写成一行?

2018-02-25 09:58 483 查看
练习中有一个很无聊的问题:如何把Python代码写成一行?

print "How can i write python in a line? \n"; print "You can use ';' follow the sentence. " ; print "Then run the script!"; print; print "Done."

使用 ; 分割每段代码,就能把Python代码写成一行,但要注意语法。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Python 学习