def function1():
print("Aww im sorry to hear")
def function2():
print("Thats fantastic")
def function3():
print("Invalid response")
ansr = input(print("Did you have a good day at school? Answer 'Y' or 'N'!!"))
if ansr == "Y":
function2()
elif ansr == "N":
function1()
else:
function3()
输出
Did you have a good day at school? Answer 'Y' or 'N'!!
None
有没有理由"无"被退回??如果是这样的话,我该如何调整我的代码来摆脱它呢?