Skip to content

Instantly share code, notes, and snippets.

@nobitagit
Created March 2, 2018 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nobitagit/5d03aeeedd5fe25153c35145072750c0 to your computer and use it in GitHub Desktop.
Save nobitagit/5d03aeeedd5fe25153c35145072750c0 to your computer and use it in GitHub Desktop.
# for a given sentence calcultate the characters score
def score_sentence(sentence):
scored = list(map(to_score, sentence))
aggregate = reduce(lambda x, y: x + y, scored, 0)
return aggregate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment