Python

built-in fucntion 1 - ord

guruzoa 2012. 7. 11. 12:28

I want to take '\x01' and get 1 from it, i.e., convert to ``int. Any ideas? Thanks

>>> ord("\x01")
1
>>> ord("\x02")
2
>>> ord("\x7f")
127

Reference : http://stackoverflow.com/questions/1411658/how-to-get-x01-to-1