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 list and positive integer k, return a new list with the k-th element from the end removed (k=1 removes the last element). If k exceeds the length, return the original list unchanged.
Summary
Remove the k-th item from the back without counting forward first.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.