publicMasters/python/5/c2byte.py

14 lines
159 B
Python
Raw Normal View History

2022-11-10 11:00:25 +01:00
r = ''
x = ord('a')
while ((x/2) != 0):
if ((x % 2) == 0):
r = r+'0'
else:
r = r+'1'
x = x / 2
print(c2byte('a'))