← 返回题库
高级

Invert Dictionary

未完成 0%

示例

输入
s = {1: "first", 2: "second", 3: "third", 4: "fourth"}
solve(s)
print(s)
期望输出
{'first': 1, 'second': 2, 'third': 3, 'fourth': 4}
Python 代码 🔒 登录后使用
🔒

登录后即可练习

注册免费账号,在浏览器中直接运行 Python 代码