import math;
for i in range(1,int(math.log(1024)/math.log(2))):
print (2**i, end=' ')
‘’’why does this not work, and thank you’’’