python shenanigans