QuestionQ58

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

Review the code snippet and select the statements that are true.

Question Image

Choose two
Explanation

Assignment of one list variable to another creates an additional reference to the same list rather than a copy. Slice deletion mutates that list in place, so both nums and vals remain references to the same list and consequently have the same length.

Community Discussion

No comments yet. Be the first to start the discussion!