(string)
| 36 | del export, decode |
| 37 | |
| 38 | def decode(string): |
| 39 | index = string.find('%') |
| 40 | while index is not -1: |
| 41 | string = string[:index] + chr(int(string[index+1:index+3], 16)) + string[index+3:] |
| 42 | index = string.find('%', index + 1) |
| 43 | return string |
| 44 | |
| 45 | if __name__ == '__main__': |
| 46 | self() |