返回顶部

收藏

for statement calls iter() on the container object

更多
for element in [1, 2, 3]:
    print element
for element in (1, 2, 3):
    print element
for key in {'one':1, 'two':2}:
    print key
for char in '123':
    print char
for line in open('myfile.txt'):
    print line

标签:Python,Buildin,Function

收藏

0人收藏

支持

0

反对

0

发表评论