Sobes.tech
Junior — Senior

What will be displayed when changing a list used through multiple variables in Python

livecode

Task condition

Determine what values will be printed for the variables list_a and list_b after executing the code below.

def some_func():
    list_a = [1, 2, 3]
    list_b = list_a
    list_a[0] = 100
    list_b[1] = 20
    print(list_a)
    print(list_b)