sorted and list(reversed) instead of .sort and .reverse but if I want
to copy a list and then change that list without changing the first
one?
And there isn't a .copy function so I have to "new = [] for element in
list: new.append(element)" ?
(I guess mutability is there for performance? Because I prefer a =
sorted(a) conceptually.)
[1, 2, 3, 4]>>a = [1,2,3]
b = a
b.append(4)
b
[1, 2, 3, 4]>>a
'hello'>>c = "hello"
d = c
d += " sir!"
c
'hello sir!'>>d
>>>
and what is the difference between extend and + on lists?