Python Example | Check if String Starts with Vowel

This python example code shows us check if a string starts with vowel.

# take inputs
string = input('Enter any String: ')

# vowel alphabet
vowel = 'aeiou'

# check string starts with vowel or consonant
if string[0].lower() in vowel:
   print(string,'starts with vowel',string[0])
else:
   print(string,'starts with consonant',string[0])