Skip to main content
Commonmark migration
Source Link

##Python 2, 48 bytes

Python 2, 48 bytes

lambda n:[s for s,t in zip(*[iter(n)]*2)if s!=t]

Try it online

Thanks to Dennis and vaultah for pointing out stuff that I missed

##Python 2, 48 bytes

lambda n:[s for s,t in zip(*[iter(n)]*2)if s!=t]

Try it online

Thanks to Dennis and vaultah for pointing out stuff that I missed

Python 2, 48 bytes

lambda n:[s for s,t in zip(*[iter(n)]*2)if s!=t]

Try it online

Thanks to Dennis and vaultah for pointing out stuff that I missed

deleted 15 characters in body
Source Link
user45941
user45941

##Python 2, 5648 bytes

n=input();print[slambda n:[s for s,t in zip(n[::2],n[1::2]*[iter(n)]*2)if s!=t]

Try it onlineTry it online

There has to be a better wayThanks to get every 2 elementsDennis and vaultah for pointing out stuff that I'm missing...I missed

##Python 2, 56 bytes

n=input();print[s for s,t in zip(n[::2],n[1::2])if s!=t]

Try it online

There has to be a better way to get every 2 elements that I'm missing...

##Python 2, 48 bytes

lambda n:[s for s,t in zip(*[iter(n)]*2)if s!=t]

Try it online

Thanks to Dennis and vaultah for pointing out stuff that I missed

Source Link
user45941
user45941

##Python 2, 56 bytes

n=input();print[s for s,t in zip(n[::2],n[1::2])if s!=t]

Try it online

There has to be a better way to get every 2 elements that I'm missing...