loading...

Discussion on: Daily Challenge #110 - Love VS. Friendship

Collapse
tblanshard profile image
Tallie

My solution to the challenge using map and reduce in Python. If anyone has any suggestions on how to improve it, I would love to hear! :)

from functools import reduce 
def wordsToMarks(word):
    print(reduce((lambda x,y: x+y), map((lambda x: ord(x) - 96), list(word))))