More Python practice algos