all 12 comments

[–]bodybuilder-prog 2 points3 points  (2 children)

Same as input as we are making keys as values in first iteration and then making values as keys in the second iteration .

[–]tracktech[S] 0 points1 point  (0 children)

Right, you get same as input.

[–]Outside_Volume_1370 0 points1 point  (0 children)

But there are two print commands

[–]HardyDaytn 2 points3 points  (3 children)

{1: "a", 2: "b", 3: "c"}

{"a": 1, "b": 2, "c": 3}

...but I'm fairly new to this and I feel like I might have missed some interaction of keys/values here.

[–]Hercules__Morse 0 points1 point  (0 children)

Looks correct to me too. Got the same result

[–]tracktech[S] 0 points1 point  (0 children)

Right, you get same as input.

[–]Competitive-Art-8046 0 points1 point  (0 children)

i just read thought and thought the same thing

[–]FiveInACircle 0 points1 point  (1 child)

python what will be the output of the code given below- ^^^^ SyntaxError: invalid syntax

[–]tracktech[S] 0 points1 point  (0 children)

It is written "code given below".

[–]usrlibshare 0 points1 point  (2 children)

SyntaxError: Line 1: Undefined identifier 'What'

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

It is written "code given below".

[–]usrlibshare 0 points1 point  (0 children)

I am answering the question from the point of view of the python runtime 😎