Skip to content

Instantly share code, notes, and snippets.

@Zaargh
Created June 6, 2016 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zaargh/d462c0a92f5a3076eb4ceb42a91d687b to your computer and use it in GitHub Desktop.
Save Zaargh/d462c0a92f5a3076eb4ceb42a91d687b to your computer and use it in GitHub Desktop.
#Line 7:
counts = [[str(len(list(iterator))), char]
for char, iterator in itertools.groupby(s)]
#Line 21:
result = ''.join([x[0] if len(x) == 1
else int(number_r.findall(x)[0]) * x[-1]
for x in vals]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment