jumpserver/apps/common/utils/integer.py

6 lines
82 B
Python

def bit(x):
if x == 0:
return 0
else:
return 2 ** (x - 1)