Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Let's say I have an input:
SA3213023215
I want to move the SA to the very end of the input. How can I do this?
Assuming that SA3213023215 is a string (which input is by default), you could use string slicing:
s = "SA3213023215" s2 = s[2:] + s[:2] # yields 3213023215SA
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.