
xxxxxxxxxx
#Linear Search Functions - www.101computing.net/linear-search-functions
#A function to read the content of a text file and store it in a list
def readTextFile(filename):
list = []
file = open(filename, "r")
for value in file:
list.append(value.rstrip('\r\n')) # strip out all tailing whitespace and carriage returns
file.close()
return list
#Main Program Starts Here
pupils = readTextFile("rewards.txt")
print(pupils)
task_alt