Loading...

The Ranked Dict

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior, mid

Problem

Write a function that takes a dict with string keys and numeric values. Return a new dict with the same key-value pairs sorted by value in descending order.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.