I create a 2D List with n cols and m rows:
2DList = [[0 for x in range(cols)] for y in range(rows)]
How can I get the number of cols and rows with the simple method?
No.of rows = len(matrix)
No.of cols = len(matrix[0]), if all the rows are of same size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With