Pythons objects can be recursive
·
Sai Kiran
Python objects can be recursive! for example, to a list you can add itself as an element.
a = [1,2,3]
a.append(a)
print(a)
Python’s copy module highlights this problem.
Python objects can be recursive! for example, to a list you can add itself as an element.
a = [1,2,3]
a.append(a)
print(a)
Python’s copy module highlights this problem.