Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # str_alpha_val_from_zero.py
- ABC_String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- ABC_String += ABC_String.lower()
- for abc in ABC_String:
- ASC2_val=ord(abc[0])
- if ASC2_val > 64 and ASC2_val < 91: # Uppercase
- gen_val=ord(abc[0])-65
- elif ASC2_val > 96 and ASC2_val < 123:
- gen_val=ord(abc[0])-71
- print abc,'=',gen_val
- print 'Done'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement