Python Program to input any string and differenciat vowels and consonants

 

sen=input('Enter a sentence.. ')

a=' '

b=' '

for i in sen:

  if i in 'aeiou':

    a=a+i

  elif i==' ':

    continue

  else:

    b=b+i

print('vowels=',a,'consonants=',b)


Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.