neo1973-germany/unitc/decimalbinär.py

11 lines
128 B
Python
Raw Normal View History

x = 255
list = []
while x != 0:
x2 = x%2
list.append(x2)
x = x/2
print list
for i in reversed(list):
print i,