第 25 讲: 字典:当索引不好用时

工作了,没有时间学习了

>>> brand = ['李宁','耐克','鱼C工作室']
>>> slogan = ['一切皆有可能','just do it','让编程改变世界']
>>> print('the is:',slogan[brand.index('鱼C工作室')])
('the is:', '\xc8\xc3\xb1\xe0\xb3\xcc\xb8\xc4\xb1\xe4\xca\xc0\xbd\xe7')
>>> print('the is:',slogan[brand.index('鱼C工作室')])
('the is:', '\xc8\xc3\xb1\xe0\xb3\xcc\xb8\xc4\xb1\xe4\xca\xc0\xbd\xe7')
>>>

 

 

 

 

 

 

 

posted @ 2018-07-03 15:12  Jenny测试开发  阅读(197)  评论(0编辑  收藏  举报