Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brianray/7720b8472b89e26b3ed3dd5fba8184fc to your computer and use it in GitHub Desktop.
Save brianray/7720b8472b89e26b3ed3dd5fba8184fc to your computer and use it in GitHub Desktop.
data = open("C:\Users\tdoucet\Desktop\Test.csv")
dict = {}
for line in data:
x = line.split(",")
a = x[0]
b = x[1]
dict[a] = b
level0 = []
level1 = []
level2 = []
level3 = []
level4 = []
level5 = []
level6 = []
for i in range (0,limit):
for key, value in dict.iteritems():
if value isnull:
level0.append(key)
if len(level0) == 0:
break
if value in level0:
level1.append(key)
if len(level1) == 0:
break
if value in level1:
level2.append(key)
if len(level2) == 0:
break
if value in level2:
level3.append(key)
if len(level3) == 0:
break
if value in level3:
level4.append(key)
if len(level4) == 0:
break
if value in level4:
level5.append(key)
if len(level5) == 0:
break
if value in level5:
level6.append(key)
if len(level6) == 0:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment