Python tricky coding questions