标签:The cti python als ret new rac return print
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‘))
46 Simple Python Exercises-Very simple exercises
标签:The cti python als ret new rac return print
原文地址:https://www.cnblogs.com/wangyanyan/p/10737264.html