QuestionQ41Verified/Data Collections – Tuples, Dictionaries, Lists, and StringsCopy linkReport a problemAsk AstroTutorSave questionReview the snippet and select the true statement: Avals is longer than numsBnums is longer than valsCnums and vals have the same lengthDThe snippet will cause a runtime error.Show AnswerAnswerExplanationAssignment makes nums and vals refer to the same mutable list. Deleting the complete slice with del vals[:] clears that list in place, leaving both references with length 0. Python documents that del a[:] clears a list.Learn morePython documentation: The del statementShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion