Junior — Senior
Impact of changing a nested list via reference
livecode
Task condition
Determine how modifying a nested list obtained by reference will affect the original list, and what results will be output.
lst = [0, [1, 2], [3]]
sub = lst[1]
sub.append([4])
print(sub)
print(lst)