I have a .txt file (with several lines of data) in the following format: last name,first name,rate,hours,gross pay
I need to create a program that will open that file (I think I have this part, below) and display each line of the file as a comma-delimited. What should I use? A list or a dictionary?
I know that dictionaries can only support two items, but these lines have 5 fields, would a list work better? And what would be the best way to go about the code? Thank you in advance!
def main():
f = open("payroll.txt", "r")