程序代码:


print("Hello World!")
print("Hello Again")
print("I like typing this.")
print("This is fun.")
print('Yay! Printing.')
print("I'd much rather you 'not'.")
print('I "said" do not touch this.')

输出结果


Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I'd much rather you 'not'.
I "said" do not touch this.

在python中单引号和双引号都是可以的,不过一般单引号被用于创建简单的字符串,比如'doge'等

最后修改:2021 年 02 月 03 日
如果觉得我的文章对你有用,请随意赞赏