Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. temp = format(ord(char), 'b')
  2.  
  3. temp = format(ord('a'), 'b')
  4. print(temp)
  5. #'1100001'
  6.  
  7. c = chr(int(temp, 2))
  8. print(c)
  9. # 'a'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement