I want to write a for loop that will iterate over the powers of 2 for each loop.
For example I would want a range like this:
2, 4, 8, 16, ... , 1024
You say you want to iterate over the powers of 2 for each loop,
Seeing your example, the formulation could be:
Make a loop that multiply the initial by 2 untill it reach 1024.
ii = 2 while ii <= 1024: print(ii) ii = ii*2