Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- def char_from_binary(word):
- x = 0
- for i in range(8):
- c = int(word[i])
- if c != 0:
- x += 2**(7 - i)
- return chr(x)
- for word in sys.argv[1:]:
- print (chr(int(word, 2)), end='')
- print ('')
Advertisement
Add Comment
Please, Sign In to add comment