PYTHONIST_RU Telegram 2312
Задача с кодом. Инвертируем ключи и значения в словаре

Напишите функцию, которая будет менять местами ключи и значения в словаре.

Примеры:

invert({ "z": "q", "w": "f" })
➞ { "q": "z", "f": "w" }

invert({ "a": 1, "b": 2, "c": 3 })
➞ { 1: "a", 2: "b", 3: "c" }

invert({ "zebra": "koala", "horse": "camel" })
➞ { "koala": "zebra", "camel": "horse" }

Решение на нашем сайте.

#задача #coding



tgoop.com/pythonist_ru/2312
Create:
Last Update:

Задача с кодом. Инвертируем ключи и значения в словаре

Напишите функцию, которая будет менять местами ключи и значения в словаре.

Примеры:

invert({ "z": "q", "w": "f" })
➞ { "q": "z", "f": "w" }

invert({ "a": 1, "b": 2, "c": 3 })
➞ { 1: "a", 2: "b", 3: "c" }

invert({ "zebra": "koala", "horse": "camel" })
➞ { "koala": "zebra", "camel": "horse" }

Решение на нашем сайте.

#задача #coding

BY Pythonist.ru - образование по питону


Share with your friend now:
tgoop.com/pythonist_ru/2312

View MORE
Open in Telegram


Telegram News

Date: |

Telegram channels fall into two types: Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. Telegram message that reads: "Bear Market Screaming Therapy Group. You are only allowed to send screaming voice notes. Everything else = BAN. Text pics, videos, stickers, gif = BAN. Anything other than screaming = BAN. You think you are smart = BAN. 4How to customize a Telegram channel? Deputy District Judge Peter Hui sentenced computer technician Ng Man-ho on Thursday, a month after the 27-year-old, who ran a Telegram group called SUCK Channel, was found guilty of seven charges of conspiring to incite others to commit illegal acts during the 2019 extradition bill protests and subsequent months.
from us


Telegram Pythonist.ru - образование по питону
FROM American