I am not sure how to pose this question, as this is my first on StackExchange. I am trying to learn how to manipulate strings in python. The algorithm is:
1: Input a string such as “Hello World!”
2: left shift the string such that first character of the string is wrapped around to the end of the string with the output as “ello World!H”. Then the code will to the right shift of the same string.
instr = "Hello World!" length = len(instr) - 1 firstChar = intstr(1)
I am a complete nooby using Python and so i am not familiar with all of it’s arsenal of functions and such. I am aware of the << and >> bitwise shift operators, however these are for ‘int’ types only. Would anyone care to point me in the right direction? I started my code as follows and this is about as far as I can get: