CJCoding With Joseph
15free / daySign inCreate account

Swap Two Entries

Swap the values stored under left and right in the dict sides using a temporary variable, so that each key ends up with the other's value, then print the dict. Input: none. Output: one line, the printed dict with the two values exchanged.

Expected Output:

{'left': 'blue', 'right': 'red'}

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
DictionariesVariables
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.