ক্যারেক্টার ক্লাস
import re
# A character set containing all vowels
pattern = r"[aeiou]"
# Lets check whether a word got a vowel in it or not
if re.search(pattern, "grey"):
print("The word 'grey' got at least one vowel!")
else:
print("No vowel found!")
if re.search(pattern, "qwertyuiop"):
print("The word 'qwertyuiop' got at least one vowel!")
else:
print("No vowel found!")
if re.search(pattern, "rhythm myths"):
print("The word 'rhythm myths' got at least one vowel!")
else:
print("No vowel found!")Last updated