DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python read text file look for string
f = open(filename, "r") whattoReturn = "None" if strToFind in f.read(): whattoReturn = strToFind
PREVIOUS
NEXT
Tagged:
#python
#read
#text
#file
#string
ADD COMMENT
Topic
COMMENT
Name
2+2 =
Submit