Young87

当前位置:首页 >个人收藏

笨办法学python 习题1:第一个程序

熟悉print打印 ,注意python2与3的区别

#gw/test/ex1.py
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.'

 

Python2能读取,python3需要在print后面带括号()

#gw/test/ex2.py
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.')

Python3读取

除特别声明,本站所有文章均为原创,如需转载请以超级链接形式注明出处:SmartCat's Blog

上一篇: 自定义对象中sort函数的使用——JAVA

下一篇: 前端如何调用后端接口?有哪几种方式?

精华推荐