Python Handle Error And Correction