Currently, I'm using a while loop which interrupts once the total steps made have exceeded a certain limit. In each iteration of this loop I have a boolean which just switches between true and false, and depending on the value of the boolean, the step taken is either 3 or 4.
The code isn't too long and it works well (for everything I've tested so far). I was just wondering if there was an even easier way of doing this? Does the range function somehow accommodate for this, or is there any function in python that does this?