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
2 views
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.5k questions

29.9k answers

500 comments

99.1k users

Browse Categories

...