lst = ['⾦', '解救吾先⽣', '美国往事', '⻄⻄⾥的美丽传说']
print("正在上映的电影: ")
for i in range(len(lst)):
print(i+1," ",lst[i])
print("***************************")
dic = {}
dic = dic.fromkeys(lst,0)
while 1:
num1 = int(input("请对你喜欢的电影进行投票: ").strip())
if 0<num1<len(lst)+1:
dic[lst[num1-1]] +=1
print("你给 {} 投票成功!".format(lst[num1-1]))
else:
print("你输入的电影下标越界!!")
break
print("统计结果如下: ")
for k,v in dic.items():
print(k," ",v)