I have figured out the solution, it was just a logical fault in my code that lead to the same output. So instead of :
typ , small , large = line.split(",") list = [typ,small,large] I used the csv.reader(file) function and then i implemented a simple for loop
for line in reader: table.append(line) Also, I implemented try except to catch FileNotFoundError instead of putting it into an if statement.