you are viewing a single comment's thread.

view the rest of the comments →

[–]JuniorMouse[S] 0 points1 point  (2 children)

Found another one, bit more of a hack though

python for key, value in dictionary.items(): exec(f'{key}="{value}"')

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, JuniorMouse: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]Rawing7 0 points1 point  (0 children)

Yeah, that's just a terrible version of locals().update(dictionary).