1

How to understand: twice call the function last_add(), but the id of the parameter is same.

def last_add(_list = []):
    _list.append('END')
    print(id(_list))

last_add()
last_add()
anthony sottile
  • 61,815
  • 15
  • 148
  • 207
Tony
  • 21
  • 4

0 Answers0