Write a python function to extract only alphabets from a given string and also include spaces


Topic: Write a python function to extract only alphabets from a given string and also include spaces

Solution

def extract_alpha(my_string):
    return "".join([ c for c in my_string if (c.isalpha() or c.isspace())])



List all Python Programs