Skip to content

Instantly share code, notes, and snippets.

Last active Dec 10, 2015
What would you like to do?
f = open('data.txt' ,'r')
import re
d = {}
title = ""
for i in f:
j = i.split("\n")
if j[0] != '#' and j[0] != '':
if re.match('#',j[0]):
title = j[0]
title_info = []
d[title] = title_info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment