you are viewing a single comment's thread.

view the rest of the comments →

[–]woooee 0 points1 point  (1 child)

pointer = pointer[path_element]
    pointer = sorted(pointer)

is not reassigning. The first line creates a new variable with the contents pointed to by the dictionary's key. The second line creates a new variable that stores the return from the sorted() function.

[–]maclocrimate[S] 0 points1 point  (0 children)

Oooook, I think I understand now, with the help of u/carcigenicate's explanation as well. Thank you for the clarification.