0
因此,我一直在重新啓動腳本。我正在做一個簡單的程序,我想有一個選擇,例如:如何使用命令重新啓動python腳本
print ('would you like to make another calculation')
choice3 = input(' Choose: [Y], [N]')
if choice3.lower() == 'y':
print ('OK!')
time.sleep(3)
我想重新啓動它。如果有人可以幫助我,謝謝......我真的很感激
我會建議使用while循環,而不是重新啓動腳本。 [像這樣](https://stackoverflow.com/questions/20337489/python-how-to-keep-repeating-a-program-until-a-specific-input-is-obtained) – MisterMystery