Set 2nd list equal to 1st list
first_lzt = ['room', 'floor', 'name']
second_lzt = first_lzt
remove()
element from 2nd list.
second_lzt.remove('room')
The element surprisingly also gets removed from the 1st list. Why?
>>> first_lzt
['floor', 'name']
Is that supposed to happen? How can I make second_lzt
independent without appending items into it?
Python 3.7.6
EDIT: expected object behavior.
str1 = "apple"
str2 = str1
str2 = str2 + "_pie"
>>> str1
"apple"
int1 = 3
int2 = int1
int2 += 4
>>> int1
3