关闭

第7个python程序:打印

标签: python
105人阅读 评论(0) 收藏 举报
[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]# python ex7.py 
mary had a little lamb.
its fleece was white as snow.
and everywhere that mary went.
..........
cheese burger





0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:129221次
    • 积分:2797
    • 等级:
    • 排名:第12810名
    • 原创:167篇
    • 转载:3篇
    • 译文:0篇
    • 评论:3条
    文章分类
    最新评论