on-internet
← Community

Search for a particular word in a txt file in python

Stack Overflow ·

Say I had a txt file which contains the following information: Name, Score bob, 3 jack, 8 ben, 4 How can I get python to find "bob", and copy bob's whole line to a variable?

Comments

Sign in or sign up to comment and upvote.

No comments yet.