Advertisement
here2share

# aa2zz_under676.py

Mar 2nd, 2020
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. # aa2zz_under676.py
  2.  
  3. abc = [chr(z) for z in range(ord('a'),ord('z')+1)]
  4.  
  5. def int2abc(z):
  6.     return abc[z/26]+abc[z%26]
  7.  
  8. def abc2int(z):
  9.     return abc.index(z[0])*26+abc.index(z[1])
  10.    
  11. for z in [0,1,100,200,300,400,500,600,26*25+25]:
  12.     a = int2abc(z)
  13.     b = abc2int(a)
  14.     print z, a, b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement