2 Matching Annotations
- Jan 2015
-
cs231n.github.io cs231n.github.io
-
classes
Word here should be 'functions'
-
print d[t] # Prints "5" print d[(1, 2)] # Prints "1" prints "2"
Those two lines are not what I expect - and my Python interpreter agrees. So perhaps that is a typo? I don't know Python well enough to guess the Levenshtein distance to what was intended here.
Aha - it's further down - we just need to stick in this initializer first:
d = {(x, x + 1): x for x in range(10)} # Create a dictionary with tuple keys
Tags
Annotators
URL
-