Write a function to replace vowels with a specific character K


Topic: Write a function to replace vowels with a specific character K

Solution

def replacewith_K(test_str, K): 
    vowels = 'AEIOUaeiou'
    for ele in vowels: 
        test_str = test_str.replace(ele, K) 
  
    return test_str



List all Python Programs