Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
345 B
179
Indexable
Never
a = [[34, 38, 50, 44, 39],
     [42, 36, 40, 43, 44], 
     [24, 31, 46, 40, 45],
     [43, 47, 35, 31, 26],
     [37, 28, 20, 36, 50]]

for r in range(len(a)):
    for c in range(len(a[r])):
        if a[r][c] % 5 != 0:
            a[r][c] = 0

for r in range(len(a)):
    for c in range(len(a[r])):
        print(a[r][c], end="\t")
    print()
Leave a Comment