SyntaxFix
Write A Post
Hire A Developer
Questions
A slightly shorter solution, that only moves the item to the end, not anywhere is this:
l += [l.pop(0)]
For example:
>>> l = [1,2,3,4,5] >>> l += [l.pop(0)] >>> l [2, 3, 4, 5, 1]