You are viewing a single comment's thread. Return to all comments →
for i in range(n): print(i**2)
range(n) generates a sequence of integers starting from 0 up to, but not including, n so it'll all be non-negative
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 →
range(n) generates a sequence of integers starting from 0 up to, but not including, n so it'll all be non-negative