How to make try/except loop until true

后端 未结 0 1664
情歌与酒
情歌与酒 2021-02-19 09:44
try:
    int(days)
except:
    print(\'Invalid input. A integer value was expected. Try again.\')
    days = (input("Enter the number of days: ", ))

相关标签:
回答
  • 消灭零回复
提交回复
热议问题