li =['电脑','手机','电视'] for key,item in enumerate(li): print(key,item) i = input("please input index:") index = int(i) print(li[index])