I am trying to make a wage calculator where a user inserts a .txt file and the program calculates the number of hours worked.
So far I am able to separate the names, wage value, and hours, but I can't figure out how to add the hours together.
So my desired result would be:
Names of Employees Wage (how much they make Added number of hours per employee
Here is the data set (file name of txt is -> empwages.txt):
(Edit: the formatting is messed so heres a screen grab of the text: 
Spencer 12.75 8 8 8 8 10
Ruiz 18 8 8 9.5 8 8
Weiss 14.80 7 5 8 8 10
Choi 15 4 7 5 3.3 2.2
Miller 18 6.5 9 1 4 1
Barnes 15 7.5 9 4 0 2
Desired Outcome:
'Spencer', 'Ruiz', 'Weiss', 'Choi', 'Miller', 'Barnes'
'12.75', '18', '14.80', '15', '18', '15'
'42', '41.5', ... and so on
Current code:
infile = open("empwages.txt","r")
masterList = infile.readlines()
nameList = []
hourList = []
plushourList = []
for master in masterList:
nameList.append(master.split()[0])
hourList.append(master.split()[1])
x = 2
while x <= 6:
plushourList.append(master.split()[x])
x += 1
print(nameList)
print(hourList)
print(plushourList)
pandas? This would be a great package to consider for this type of problem.