python code study