1. 程式人生 > >day 11 Python課上練習解釋

day 11 Python課上練習解釋

 

 

 

將檔案對應的索引打印出來
test = input(">>>>")
print(test)
l = len(test)
print(l)
t = range(l)
for item in t:
    print(item,test[item])

    # 方法精簡2
test = input(">>>>")
for item in range(0,len(test)):
    print(item,test[item])