You are viewing a single comment's thread. Return to all comments →
Nice solution! How about using iterators instead of arrays? It's more memory-efficient
print(*(num**2 for num in range(n)), sep='\n')
Seems like cookies are disabled on this browser, please enable them to open this website
Loops
You are viewing a single comment's thread. Return to all comments →
Nice solution! How about using iterators instead of arrays? It's more memory-efficient