Open DNPotapov opened 2 years ago
def uni_total(s): res = 0 for item in s: res += ord(item) return res
You'll be given a string, and have to return the sum of all characters as an int. The function should be able to handle all ASCII characters.
examples:
uniTotal("a") == 97 uniTotal("aaa") == 291
https://www.codewars.com/kata/572b6b2772a38bc1e700007a