Created
August 23, 2019 16:29
-
-
Save Sunil-ghodela/ff929cfce3507945de13ba4a1d67a197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [[1, 2, 3, 4], [5, 6], [7, 8, 9]] | |
for i in range(len(a)): | |
for j in range(len(a[i])): | |
print(a[i][j], end=' ') | |
print() |
a = [[1, 2, 3, 4], [5, 6], [7, 8, 9]] for row in a: for elem in row: print(elem, end=' ') print()
for row in a: print(' '.join([str(elem) for elem in row]))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a = [[1, 2, 3, 4], [5, 6], [7, 8, 9]] for i in range(len(a)): for j in range(len(a[i])): print(a[i][j], end=' ') print()