1. 程式人生 > >python隨筆

python隨筆

logs color 輸入 int python 退出 col __next__ put

叠代器:

a=iter([1,2,456,486,456,486,456,7489,78,456,789,456,789,\            #輸入一次取一個元素,輸入0退出
        4,5,52,45,45,12,23,56,9,89,56,56,5,5,6,56,56,4,5,98,        121,12,12,121,21,21,21,21,21,54,54,8,7,54,6,546,898,6,        4,54,85,45,45,])
while True:
    b=input("")
    if b=="0":
        break
    else
: print(a.__next__())

python隨筆