Skip to content

Instantly share code, notes, and snippets.

from itertools import permutations, combinations
from collections import defaultdict
from pprint import pprint
VALS = dict(zip(list('PBGY'), [4, 3, 2, 1]))
def score(p, weights = [4,3,2,1]):
return sum([a * b for a,b in zip([VALS[x] for x in p], weights)])

Keybase proof

I hereby claim:

  • I am nabraham on github.
  • I am nabraham (https://keybase.io/nabraham) on keybase.
  • I have a public key ASApzKBEvI9DuNQJ3GYCNFjQBdlGlvKCp4ZNVHY__Q_fEAo

To claim this, I am signing this object: