Codes for python