You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
128 B
Python
11 lines
128 B
Python
16 years ago
|
x = 255
|
||
|
list = []
|
||
|
while x != 0:
|
||
|
x2 = x%2
|
||
|
list.append(x2)
|
||
|
x = x/2
|
||
|
print list
|
||
|
for i in reversed(list):
|
||
|
print i,
|
||
|
|