Skip to content

Instantly share code, notes, and snippets.

@ychoi-kr
Created December 29, 2021 09:58
Show Gist options
  • Save ychoi-kr/4195921ab8691d129caeafb85182bf38 to your computer and use it in GitHub Desktop.
Save ychoi-kr/4195921ab8691d129caeafb85182bf38 to your computer and use it in GitHub Desktop.
# https://www.facebook.com/groups/pythonkorea/permalink/4703346156415175/
s = 'program'
L = list(s)
for _ in s:
L = [L.pop(-1)] + L
print(''.join(L))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment