Cut the sticks (python)