Back

Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
1 view
by (120 points)
My script:

a=open("textfile.txt",'r+','encoding="ANSI")

word_starts_with=input("Enter any letter")

for line in a:

       word=line.strip()

      if word[0] ==word_starts_with:

           print(word)

Please log in or register to answer this question.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...