csc-python-solutions/08/6 - Character Map.py

10 lines
235 B
Python
Raw Normal View History

2021-02-18 17:12:16 +00:00
res = ""
for i in range(2, 8):
chars = "chr: "
nums = "asc: "
for j in range(16):
chars += chr(16*i+j) + " "
nums += str(16*i+j) + " " * (4-len(str(16*i+j)))
res += chars + "\n" + nums + "\n"
print(res[:-1])