You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
201 B
10 lines
201 B
from sys import version_info
|
|
|
|
if version_info[0:2] < (2, 6):
|
|
def bin(x):
|
|
if x <= 1:
|
|
return '0b'+str(x)
|
|
else:
|
|
return bin(x>>1) + str(x&1)
|
|
else:
|
|
bin = bin
|
|
|