QuestionQ287Verified/Data Collections – Tuples, Dictionaries, Lists, and StringsCopy linkReport a problemAsk AstroTutorSave questionWhat does the following snippet output? A12B(2, 1)C(1, 2)D21Show AnswerAnswerExplanationPython dictionaries preserve insertion order, so the values for keys '1' and '2' are processed in that sequence. Index 1 selects the second item in each tuple, producing 2 followed directly by 1 because end='' adds no separator.Learn morePython Built-in Types — dictShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion