Open
Description
I found a more efficient way of solving Question 7 using list comprehension. HOWEVER, this is not for beginners, it's just a fun way of solving it. Let me know what you think about my solution.
arrays, elems = map(int, input().split(','))
print([[i * j for j in range(elems)] for i in range(arrays)])
Metadata
Metadata
Assignees
Labels
No labels