I have a variable string, example
a = 'swift'
and if I shift all characters to the left 1 time it becomes a = 'wifts'
and if I shift to right 2 times it becomes a = 'tswif'
How to do this? I tried this function:
a = 'swift'
for x in range(len(a)-1):
a[x+1]
and the result is 'wift'
I expect the output if I shift to left 1 times it becomes a = 'wifts'
and if I shift to right 2 times it becomes a = 'tswif'