Nahid8195

I love

Oct 14th, 2021
745
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a_binary_string = "01101001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101"
  2.  
  3.  
  4. binary_values = a_binary_string.split()
  5.  
  6. ascii_string = ""
  7.  
  8. for binary_value in binary_values:
  9.  
  10.     an_integer = int(binary_value, 2)
  11.  
  12.  
  13.     ascii_character = chr(an_integer)
  14.  
  15.  
  16.     ascii_string += ascii_character
  17. print(ascii_string)
RAW Paste Data