What is the output of the following code ?
def foo(p): p = ['pass', 'except'] return id(p) e = ['None', 'True'] print(id(e) == foo(e))
Here p = ['pass', 'except']we are reassigning a new list to "p" so new object is createdSo id() value will be changed
p = ['pass', 'except']
Comment here: