class Solution(object):
def titleToNumber(self, s):
key = 0
l = len(s)
count = 0
if not s:
return s
else:
for i in s:
key += (ord(i)64)*pow(26, l1count)
count += 1
return key
Simple Python solution(60 ms)  easy to understand

my method is similar with yours, but my solution costs 110ms.. here is my solution. Could you help me figure out the reason?
class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ n = len(s) sum = 0 count = 0 for i in s: count += 1 sum = sum + (ord(i)64)*(26**(ncount)) return sum