for i in range(7): print(i**3)
We have used range here to generate the sequence of numbers.
returns the sequence of numbers up to
range takes two other arguments as well
start argument tells where to start the sequence from. Defaults to 0.
step argument tells the increment value between each number in the sequence. Defaults to 1.
range in Python3 returns a
range object, not list.