In python, is there a difference between calling clear() and assigning {} to a dictionary? If yes, what is it? Example:
clear()
{}
d = {\"stuff\":\"
As an illustration for the things already mentioned before:
>>> a = {1:2} >>> id(a) 3073677212L >>> a.clear() >>> id(a) 3073677212L >>> a = {} >>> id(a) 3073675716L