How To Replace An Element In An Array Python