python. how does it work