Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/geekcomputers/Python
/ rotate
Function
rotate
string_rotation.py:7–15 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
5
6
7
def
rotate(n):
8
a = list(n)
9
if
len(a) == 0:
10
return
print([])
11
l = []
12
for
i in range(1, len(a) + 1):
13
a = [a[(i + 1) % (len(a))]
for
i in range(0, len(a))]
14
l += [
""
.join(a)]
15
print(l)
16
17
18
string = str(input())
Callers
1
string_rotation.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected