What is aliasing ? Explain with an example.
Question :
What is aliasing ? Explain with an example.
A circumstance where two or more variables refer to the same object is called aliasing. If variable a refers to an object and we assign b to a, then both variables refer to the same object.
For example,
>>> a = [ 1,3,5 ]
>>> b = a
>>> b is a
true