当前位置:   article > 正文

Python编程从入门到实践-第六章动手试一试_from re import findall from random import choice f

from re import findall from random import choice from string import digits d

#6-1
information={
    'first_name':'simba',
    'last_name':'lee',
    'age':str(3),
    'city':'nj',
    }
for a,b in information.items():
    print(a,b)

#6-5
rivers={
    'nile':'egypt',
    'abcd':'china',
    '1234':'usa',
    }
for river,country in rivers.items():
    print('The '+ river+' runs through '+country.title()+'.')
for river in rivers.keys():
    print(river)
for name in rivers.values():
    print(name.title())
#6-6
favorite_languages={
    'jen':'python',
    'sarah':'c',
    'edward':'ruby',
    'phil':'python',
    }
names=['jen','tom',&#

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/1007555
推荐阅读
相关标签
  

闽ICP备14008679号