Skip to content

Instantly share code, notes, and snippets.

@fuwiak
Created April 8, 2019 15:55
Show Gist options
  • Save fuwiak/c4ed9ff9f087896d9bd48c0389e8e6e1 to your computer and use it in GitHub Desktop.
Save fuwiak/c4ed9ff9f087896d9bd48c0389e8e6e1 to your computer and use it in GitHub Desktop.
string = '11100100’
c = string[0]
lista = []
lista.append(c)
for x in string[1:]:
if x == c:
lista.append(x)
else:
print(lista)
c = x
lista = []
lista.append(c)
print(lista)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment