Skip to content

Instantly share code, notes, and snippets.

@huangtw
Created February 27, 2014 02:45
Show Gist options
  • Save huangtw/9243347 to your computer and use it in GitHub Desktop.
Save huangtw/9243347 to your computer and use it in GitHub Desktop.
35 char python code to reverse group by 4
s="abcd1234xyz"
t=''
while s:t=s[:4]+t;s=s[4:]
s=t
print s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment