Created
June 6, 2016 22:29
-
-
Save Zaargh/d462c0a92f5a3076eb4ceb42a91d687b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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