Skip to content

Instantly share code, notes, and snippets.

/1.py

Created September 2, 2016 18:20
Show Gist options
  • Save anonymous/8ee15a838a1d343685d5d3fe70db0b50 to your computer and use it in GitHub Desktop.
Save anonymous/8ee15a838a1d343685d5d3fe70db0b50 to your computer and use it in GitHub Desktop.
import re
import sys
from collections import deque
s = re.sub(r'\s+', '', ''.join(sys.argv[1:]))
d = deque(s)
s = '\n'.join('%s' % (' '.join(d), d.rotate(-1))[0] for _ in s)
print('[b]\n%s\n[/b]' % s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment