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
- L3
Problem
Given a string s and a dict mapping single characters to single characters, return a new string where each character is replaced by mapping[char] if present, else kept unchanged.
Summary
Every letter has an alias - you just need the right codebook.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.