首页 > 代码库 > ex34.py
ex34.py
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。