string=input('enter string:') vowels=0 consonants=0 lis=['a','e','i','o','u'] for i in string: if i.lower() in lis: vowels+=1 else: consonants+=1 print('In',string,'there are',vowels,'vowels and',consonants,'are there',)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter