Skip to content

Instantly share code, notes, and snippets.

@stephenturner
Created August 1, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenturner/4f0ee6be04d1c600200ca261aec4a1de to your computer and use it in GitHub Desktop.
Save stephenturner/4f0ee6be04d1c600200ca261aec4a1de to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import sys
header=True
for line in sys.stdin:
if line.startswith('##'):
if header:
print line.strip()
continue
elif line.startswith('#'):
if header:
print line.strip()
header=False
continue
print line.strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment