Skip to content

Instantly share code, notes, and snippets.

@pydsigner
Created December 7, 2017 05:09
Show Gist options
  • Save pydsigner/2e2312e6e53ddadcbcc6e3834ac80d31 to your computer and use it in GitHub Desktop.
Save pydsigner/2e2312e6e53ddadcbcc6e3834ac80d31 to your computer and use it in GitHub Desktop.
>>> lines = c.split('\n')
>>> S1 = set()
>>> S2 = set()
>>> for line in lines:
... S1.add(line.split()[0])
... if '->' in line:
... for stacked in line.split('->')[-1].split(','):
... S2.add(stacked.strip())
...
>>> S1 - S2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment