Binary Spritz ... in binary!
·Do you want to know the binary ascii of Binary spritz? Here’s a quick python script to print it!
We are using the following functions:
- a for loop to iterate over the element in the string x
- a print function with the space char as and to concatenate the elements in a single line
- the ord function to translate from char to int, eg ord(‘B’) = 66
- the bin function to get a string representing the base2 value 66 = 0b1000010
- we get rid of the 0b string by selecting from the third element (
[2:]
) of the string
Nice and easy ;)