码迷,mamicode.com
首页 > 其他好文 > 详细

ex34.py

时间:2016-11-24 08:00:56      阅读:735      评论:0      收藏:0      [点我收藏+]

标签:int   pytho   span   gbk   als   nim   div   color   python   

 1 # -*- coding:GBK -*-
 2 animals = ["", "python", "孔雀", "袋鼠", "鲸鱼", "鸭嘴兽"]
 3 
 4 place1 = animals[0]
 5 print ("the place1 animal is %r." % place1)
 6 
 7 no3 = animals[3]
 8 print ("the no3 animal is %r." % no3)
 9 
10 no1 = animals[0]
11 print ("the no1 animal is %r." % no1)
12 
13 place3 = animals[2]
14 print ("the place3 animal is %r." % place3)
15 
16 no5 = animals[5]
17 print ("the no5 animal is %r." % no5)
18 
19 place6 = animals[5]
20 print ("the place6 animal is %r." % place6)
21 
22 place4 = animals[3]
23 print ("the place4 animal is %r." % place4)
24 
25 #应该看到的结果
26 ‘‘‘the place1 animal is ‘熊‘.
27 the no3 animal is ‘袋鼠‘.
28 the no1 animal is ‘熊‘.
29 the place3 animal is ‘孔雀‘.
30 the no5 animal is ‘鸭嘴兽‘.
31 the place6 animal is ‘鸭嘴兽‘.
32 the place4 animal is ‘袋鼠‘.‘‘‘

 

ex34.py

标签:int   pytho   span   gbk   als   nim   div   color   python   

原文地址:http://www.cnblogs.com/jiangzhipeng/p/6096042.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!