def z(): lst = [] lst.append(lst) print(id(lst)) return lst a = z()b = z() z()z()c = z()d = z()
Standard input is empty
23351162085704 23351162085640 23351162043784 23351161545032 23351160599752 23351160599816
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!