Hi!
I want to reads two files and create simple dictionary. Input file contain
more than 10000 rows
diz5 = {}
with open("tmp1.txt") as p:
for i in p:
lines = i.rstrip("\n").split("\t")
diz5.setdefault(lines[0],set()).add(lines[1])
diz3 = {}
with open("tmp2.txt") as p:
for i in p:
lines = i.rstrip("\n").split("\t")
diz3.setdefault(lines[0],set()).add(lines[1])
how can manage better this reading and writing?
thanks so much
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor