Decode String Function Python