46 Simple Python Exercises-Very simple exercises,46 Simple Python Exercises-Very simple exercises
46 Simple Python Exercises-Very simple exercises
4、Write a function that takes a character (i.e. a string of length 1) and returns True if it is a vowel, False otherwise.
def if_vowel(a):
a=a.lower()
if a in('a','e','i','o','u'):
return True
else:
return False
print(if_vowel('A'))

更多精彩