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 Falseprint(if_vowel(‘A‘))
原文地址:https://www.cnblogs.com/wangyanyan/p/10737264.html
时间: 2024-10-10 13:02:34