# Python program to check if 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])
      
      Python language logo

      starting element

      beginner
      strings

      Python to Check if Word Starts with Vowel or consonant

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.