Encode And Decode String In Python