Error Detection And Correction Code In Python