Traversal Through Hashmap In Python