I need to check whether a vowel is present in a word. If it is, an operation should be carried out on the word say op(word). I want to avoid a for loop because
op(word)
You could use regex.
import re if re.search('[AEIOU]', word, flags=re.I): # contains vowels else: # does not