Based on all the information i got from you guys i wrote this:
for i in range(len(m)):
for j in range(len(m[i])):
for tup in m:
for elem in tup:
print(elem, end=' ')
for tup2 in m:
for num in tup2:
What was confusing me was that i didn't knew what were the values of "i" and "j" and then on top of that what the print was doing also was adding to this confusion, so i just printed the values of "i" and "j" and they were 3 and 2 and then after making sense of what the print was doing i got it.
-First is doing 3 loops, and 3 is from the len of the tuple
-After that it is doing 2 loops based on the len of the other 3 tuples which is
-Finally it is printing each element like this m[i][j] which means it will start with the element 0,0 then 0,1, then 1,0, then 1,1 then 2,0, then 2,1
This would be the "map" of the tuple:
Each element has it's coordinates first element is 0,0 the second is 0,1 and so on.
And for this to be printed like this and not in a single line you use:
What i understood about this was that " " is just an space, no matter, but end"") is making so the code doesn't break the line thus prints each loop on a single line and ends each line it prints with an space so it doesn't print the result one after the other, the other print() just adds a break line to make it more "readable".
All i got thanks to you guys because i was not seeing this before, why i got the error, why i wasn't understanding the for loops, why i could have done it in a simpler way.
Everything is clear now guys, thank you all.