How to identify the consonants in string? |String | Python Code.

Source Code

st=input("Enter your string ") vowel="aeiouAEIOU" l1=[] for i in st: if(i not in vowel): l1.append(i) print("Consonants in given String") print (l1)

output

Enter your string hello Consonants in given String ['h', 'l', 'l']

Comments

Popular posts from this blog

Introduction to Python.

Decision Making Statement.