File: class/Workbook/Exercises/Lab4/scanfile2.py
def scanner(name, function): count = 0 file = open(name, 'r') # create file for line in file.readlines(): count = count+1 function(line, count) # call function file.close()