Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # int2base_demo.py
- list = "ABCDEFGHIJKLMNO"
- def int2base(d, base):
- s = ''
- baseLen = len(base)
- d += 1
- while d:
- s = base[d % baseLen - 1] + s
- d = (d - 1) / baseLen
- return s
- for z in range(256):
- print int2base(z ,list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement