How To Replace Code In Python