AMOR Python CODE