Write a python program to accept a string from a user and re-display the same after removing vowels from it.

def remove_vowel():

    l=['a','e','i','o','u']

    while True:

        str1=input("Enter The String, Enter x to Terminate")

        if (str1=='x'):

            break

        else:

            for i in str1:

                if i in l:

                    str1=str1.replace(i,'')

        print("After remove vowels in string:",str1)

remove_vowel()


Comments

Popular posts from this blog

Write a python program to compute cumulative product of a list of numbers (write function cumulative_product).

Write a Python program to compute distance between two points taking input from the user. Formula for Pythagorean theorem for compute distance between two points is: