repl.it
@anonymous/

UtilizedDarkmagentaLeafwing

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
def s(t,n):return t if n==0 else s((t[1]+t[0]+t[2:-2]+t[-1]+t[-2])[1:-1],n-1)

print(s("ABCDEFGHIJKLMNOP",3))
print(s("Hello",1))
print(s("123321",2))