Loading...
The Carousel
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 rotates a list left by k positions. The first k elements move to the end. Handle cases where k is larger than the list length gracefully using modulo.
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.