第7个python程序:更多打印

来源:互联网 发布:java电商项目视频教程 编辑:程序博客网 时间:2024/05/01 20:16
[root@mysql1 pshell]# cat ex7.py 
#!/usr/bin/env Python
#-*-coding:utf-8-*-


print "mary had a little lamb."
print "its fleece was white as %s." % 'snow'
print "and everywhere that mary went."
print "." * 10 #what'd that do?


end1="c"
end2="h"
end3="e"
end4="e"
end5="s"
end6="e"
end7="b"
end8="u"
end9="r"
end10="g"
end11="e"
end12="r"


#wtch that comma at the end. try removing it to see what happens
print end1 + end2 + end3 + end4 + end5 + end6,
print end7 + end8 + end9 + end10 + end11 +end12
[root@mysql1 pshell]# 
[root@mysql1 pshell]# 
[root@mysql1 pshell]# 
[root@mysql1 pshell]# 
[root@mysql1 pshell]# 
[root@mysql1 pshell]# python ex7.py 
mary had a little lamb.
its fleece was white as snow.
and everywhere that mary went.
..........
cheese burger
0 0