Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
d2 = {}
d2.update(d1)


Hashmap

Python kindly provides a built-in type hashmap named as dictionary. You can easily hash like below:

Code Block
myHashmap = {}

# hash by name
myHashmap['Chun'] = 1234
myHashmap['John'] = 2342

# print hash value
print( myHashmap['Chun'])


Generator

Random number generation

...