0
我目前正在學習Python編程。我使用這個模塊的目標是在文件中輸入一些數據,我希望用戶能夠多次執行。但是,我的while循環只會執行一次,即使我在最後按「1」,它也不會再執行。while循環,不會在Python 3.5中運行
ctl = 1
while ctl == 1:
print("\n")
titre = input("Nom du film : ")
année = input("Année : ")
catégorie = input("Catégorie : ")
fichier = open("Data_Film","a",encoding = "UTF-8")
fichier.write(titre + ";" + année + ";" + catégorie + "\n")
fichier.close()
print("\n")
print("1 - Ajouter un autre film")
print("2 - Menu principal")
ctl = input("Que vouez vous faire?")
天哪謝謝! Ctrl + C Ctrl + V並不總是你的朋友!再次感謝! – Gaboik