📌  相关文章
📜  如何在 python 代码示例中询问是或否问题

📅  最后修改于: 2022-03-11 14:47:20.154000             🧑  作者: Mango

代码示例1
answer = input("Enter yes or no: ") 
if answer == "yes": 
    # Do this. 
elif answer == "no": 
    # Do that. 
else: 
    print("Please enter yes or no.")