Jan-20-2021, 10:07 PM
fromdict takes a list of keys and a value and assigns that value to all keys. If you send a list as value, all keys share the same list. When you print the dictionary you can see that all keys have an empty list but you can't see that it is the same list and that the keys share it. The only way get around the problem is as @BashBedlam indicates.