list(map(ord, '^C'))
def myord(c): if len(c) == 2 and c[0] == '^': return ord(c[1]) - ord('@') else: return ord(c) print(myord('^C'))