Is there a more pythonic way of converting excel-style columns to numbers (starting with 1)?
Working code up to two letters:
For index that starts from zero (e.g. A = 0, B = 1, and so on):
def col_to_index(col): A = ord('A') return sum(i * 26 + (ord(c) - A) for i, c in enumerate(col[::-1].upper()))