4 ms·
Or you can use a for to satisfy the linter that is more in the spirit of the while loop, albeit at a cost of O(n) memory where n is the number of iterations the
by tzs 5y ago
Or you can use a for to satisfy the linter that is more in the spirit of the while loop, albeit at a cost of O(n) memory where n is the number of iterations the loop takes:
scale = 5
t = [1]
for i in t:
do_stuff(scale)
scale = scale/2
if scale > 0.1:
t.append(1)