I want to have a original list and reversed list in python 3, so i try this code. And i found a new issue. Why aList in this code is reversed ? I thought we have 2 seperate list in here after assignment b=aList, and then i reverse b, not the aList, so why aList is reversed
aList = [123, 'xyz', 'zara', 'abc', 'xyz'];
b=aList
b.reverse()
print(aList)
The output is : ['xyz', 'abc', 'zara', 'xyz', 123]
I thought the output has to be the original list because we change the b list not the aList