ASCII Table example script (phyduino.py) Prints the printable ASCII characters, 33 ("!") to 126 ("~"), each with its value in decimal, hexadecimal, octal and binary, then stops.
- Output
ASCII Table ~ Character Map
!, dec: 33, hex: 21, oct: 41, bin: 100001
", dec: 34, hex: 22, oct: 42, bin: 100010
...
print("ASCII Table ~ Character Map")
for code in range(33, 127):
print("%s, dec: %d, hex: %x, oct: %o, bin: %s" % (chr(code), code, code, code, bin(code)[2:]))