Code Polish python code