python check if line in file contains string code example
Example: python read text file look for string
f = open(filename, "r")
whattoReturn = "None"
if strToFind in f.read():
whattoReturn = strToFind
f = open(filename, "r")
whattoReturn = "None"
if strToFind in f.read():
whattoReturn = strToFind