Loading...

The Cipher Wheel

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

A data masking pipeline needs to substitute characters in strings based on a lookup table. Given a string and a character-to-character mapping dictionary, return a new string where each character is replaced by its mapped value. Characters not in the mapping should remain unchanged.

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.