Programming Examples
Write Python code to display sentence starting with given character from abc.txt file
fp=open("data.txt","r")
data=fp.read()
sen=data.split(".")
ch=input("Enter any Start Char : ")
for line in sen:
  line=line.strip()
  if line.startswith(ch):
    print(line)
Output/ Explanation: