Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. Usual way: `defaultdict(lambda: defaultdict(list))`
  2.  
  3. But sometimes you get in trouble when pickle can not serialize dict with lambda
  4.  
  5. So you can use: `defaultdict(defaultdict(list).copy)`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement