QuestionQ57Verified/Computer Programming and Python FundamentalsCopy linkReport a problemAsk AstroTutorSave questionWhat output is expected from the following code? A1 2 3B1 2 2C3 2 1D2 1 3Show AnswerAnswerExplanationPython evaluates the right-hand side of a multiple assignment before assigning the resulting values to the targets. Thus z, y, x = x, y, z reverses x and z, resulting in x = 1, y = 2, and z = 3; print(x, y, z) outputs 1 2 3.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion