Re: [Tutor] R:reformatting data and traspose dictionary

2016-04-20 Thread Peter Otten
jarod_v6--- via Tutor wrote: > Dear All, > sorry for my not good presentation of the code. > > I read a txt file and I prepare a ditionary > > files = os.listdir(".") > tutto={} > annotatemerge = {} > for i in files: By the way `i` is the one of the worst choices to denote a filename, only to

[Tutor] R:reformatting data and traspose dictionary

2016-04-20 Thread jarod_v6--- via Tutor
Dear All, sorry for my not good presentation of the code. I read a txt file and I prepare a ditionary files = os.listdir(".") tutto={} annotatemerge = {} for i in files: with open(i,"r") as f: for it in f: lines = it.rstrip("\n").split("\t")