Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python left rotation
Shah
Programming language:
Python
2021-07-18 06:37:59
0
Q:
python left rotation
Sam Drew
Code:
Python
2021-06-26 18:01:13
def
rotate(l, n):
return
l[n:] + l[:n]
print
(rotate([
1
,
2
,
3
,
4
,
5
],
2
))
#output : [3, 4, 5, 1, 2]
0
Tags
python
Related
python: left join
integral division in python
python floor float
how to rotate the list in python
rotate 90 degrees clockwise counter python
rotation matrix to euler angles python cv2
right-left staircase python
degree symbol in python
emacs shift region left python
rotate image python
rotation of n prime numbers in python
rotate existing labels python
how to round a float in python
python rotate list
euler angle to rotation vector python
New to Communities?
Join the community