【发布时间】:2019-01-26 10:23:36
【问题描述】:
如果有人输入错误,我需要帮助,它应该在 python3 中再次返回问题。
我试图返回变量。
def main():
this = input ('Is this your ..? (Yes/No)')
if this != 'Yes' and this != 'No':
print ('please provide a valid answer')
我想一次又一次地问这个问题,直到答案是“是”或“否”。
【问题讨论】:
标签: python function variables input