tmp for in string tmp chr int bin ord zfill -1 string tmp

1
2
3
4
tmp = ''
for i in string:
tmp += chr(int(bin(ord(i))[2:].zfill(8)[::-1], 2))
string = tmp