I have the following C for loop using bit shifts, that I want to reimplement in python.
n = 64
for(int stride = n>>1; stride >0; stride >>=1)
{...
So wow would this loop look in python?
I know that n>>1 stands for division by 2, but I find it hard to model that with range().
All
for(;;)loops can be rewritten aswhileloops, and vice versa.EDITED to reflect the change in the original