Advertisement
Guest User

Untitled

a guest
Jan 19th, 2023
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. test = "John Smith went to the store"
  2. test = test.split()
  3. first = test.pop(0)
  4. test[0] = f'{first} {test[0]}'
  5. print(test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement