Rotate a Reading List

Return a new list rotated left by steps positions without changing item order within each part. Negative steps rotate right. Wrap steps modulo the list length, preserve duplicates and return [] for an empty list.

Difficulty: beginner

Examples

  • [["Python","SQL","Git"],1]["SQL","Git","Python"]

Your solution

Python

Results

Python starts when you run or submit this challenge.

Back to Lesson