Skip to content

Instantly share code, notes, and snippets.

@rjshekar90
Created March 7, 2017 23:34
Show Gist options
  • Save rjshekar90/529796e70e472b69d0221553cb8a108a to your computer and use it in GitHub Desktop.
Save rjshekar90/529796e70e472b69d0221553cb8a108a to your computer and use it in GitHub Desktop.
from itertools import groupby
for k,g in groupby((raw_input()), int):
print (len(list(g)),k),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment