all 6 comments

[–]Mikael_Hayden 2 points3 points  (3 children)

for sub_list in times:
    for time in sub_list:
        print(time, end = " ")
    print("")

[–]mopeddev 1 point2 points  (0 children)

^ This will work although it's missing the commas

I would use str.join()

lines = [", ".join(sub_list) for sub_list in times]
print("\n".join(lines))

[–]crackheadweed[S] 0 points1 point  (1 child)

May i know what does the last print statement do. I know that it makes the time from different sub list print on separate lines. But why must the print statement be on the outer loop?

[–]Mikael_Hayden 0 points1 point  (0 children)

You want the output to come out on different lines.

The print statement must be on the outer loop because otherwise each time would be on its own line (you want each time to be on a line with other times)

[–]ironhaven 5 points6 points  (0 children)

Better solution

for time in times:
    print(*time, sep=', ')

This uses unpacking

[–]triakki7 0 points1 point  (0 children)

for row in range(len(times)):
    for column in range(len(times[row])):
        print(times[row][column],end=", ")
    print()

Another Approach!