Skip to content

Write a Python Program to print the words starting with an alphabet in a user entered string.

Class 11th IP (065)

Write a Python Program to print the words starting with an alphabet in a user entered string.

SOLUTION..

s = input("Enter sentence: ") ch = input("Enter starting alphabet: ") words = s.split() for word in words: if word.lower().startswith(ch.lower()): print(word)/h4>