You are viewing a single comment's thread. Return to all comments →
return sum(abs(ord(s[i]) - ord(s[-i -1])) for i in range(int(len(s) / 2)))
Seems like cookies are disabled on this browser, please enable them to open this website
The Love-Letter Mystery
You are viewing a single comment's thread. Return to all comments →
return sum(abs(ord(s[i]) - ord(s[-i -1])) for i in range(int(len(s) / 2)))