how to make while file contains text python 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