Is there a way in python to look through a file line by line and find a word in that line, but only if the word is the first word in the line? Like if it was looking for the word "apple" then it would only notice if the line started with "apple", but not if "apple" was somewhere in the middle of the line.
Brickmack 0 Newbie Poster
Recommended Answers
Jump to PostMaybe this is too early, but generally the way after you become more familiar with the functions, you can start to use
generator expressions, which I love very much and looks often (but not always) more readable to me.In my own idioms, giving maybe some ideas for future:
…
All 3 Replies
d5e5 109 Master Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
d5e5 commented: Thanks for the tips! +2
richieking 44 Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.