組み込み関数 ord

 ord(文字列c)

 引数で与えた文字cのASCIIコードを返します。

#coding: shift-jis

print ord('A')
print ord('a')

raw_input()

出力画面:
 65
 97