Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. user_genre_score = collections.defaultdict(lambda: collections.defaultdict(int))
  2.  
  3. defaultdict(<function <lambda> at 0x7fb1eb36e140>, {38913L: defaultdict(<type 'int'>, {10L: 1}), 38949L: defaultdict(<type 'int'>, {8L: 1, 10L: 1, 22L: 1}), 38985L: defaultdict(<type 'int'>, {8L: 1}), 19309L: defaultdict(<type 'int'>, {9L: 1, 10L: 2, 11L: 3}), 38959L: defaultdict(<type 'int'>, {11L: 1}), 19763L: defaultdict(<type 'int'>, {13L: 1}), 38708L: defaultdict(<type 'int'>, {2L: 1, 11L: 1}), 38902L: defaultdict(<type 'int'>, {3L: 1, 22L: 10}), 38905L: defaultdict(<type 'int'>, {4L: 2}), 23695L: defaultdict(<type 'int'>, {6L: 17}), 13502L: defaultdict(<type 'int'>, {5L: 1, 22L: 4})})
  4.  
  5. for k,v in user_genre_score.iteritems():
  6. print k
  7.  
  8. 'long' object is not iterable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement