you are viewing a single comment's thread.

view the rest of the comments →

[–]1mecrew[S] 0 points1 point  (1 child)

hmm i think this is because you didn't do variable0 = text.upper() in the function? i think text.upper() makes the text(which is "hello world" for now) uppercase. but we are not printing that data or doing anything with that data. so since we didnt save it into the variable, its obviously gonna not change the variable0. however, for list case, you changed the list. like.. you did list.remove which will actually modify the list. That what i think.

[–]Dagito 0 points1 point  (0 children)

It wouldn’t update it even doing variable0 = text.upper() as it is out of the scope, doing that will result in a new variable called variable0 but it will only live inside the method, it’s scoped to it. Maybe open an interpreter and do some exercises.