当我运行程序时,它不会返回值True或False。为什么会这样?
def esvocal(letter):
vocal = "a","e","i","o","u"
vocalup = "A","E","I","O","U"
if letter == vocal and letter == vocalup:
return True
else:
return False
esvocal("s")
esvocal("a")
答案 0 :(得分:-2)
def esvocal(letter):
vocal =[ "a","e","i","o","u"]
vocalup = ["A","E","I","O","U"]
if letter in vocal and letter in vocalup:
return True
else:
return False
esvocal("s")
esvocal("a")