python common codes