Re: Issue values dictionary

2013-06-05 Thread Peter Otten
alex23 wrote: def get_transcript_and_size(line): columns = line.strip().split() return columns[0].strip(), int(columns[1].strip()) You can remove all strip() methods here as split() already strips off any whitespace from the columns. Not really important, but the

Re: Issue values dictionary

2013-06-05 Thread alex23
On Jun 5, 5:43 pm, Peter Otten __pete...@web.de wrote: You can remove all strip() methods here as split() already strips off any whitespace from the columns. Not really important, but the nitpicker in me keeps nagging ;) Thanks, I really should have checked but just pushed the OPs code into a

Issue values dictionary

2013-06-04 Thread claire morandin
I have two text file with a bunch of transcript name and their corresponding length, it looks like this: ERCC.txt ERCC-2 1061 ERCC-3 1023 ERCC-4 523 ERCC-9 984 ERCC-00012 994 ERCC-00013 808 ERCC-00014 1957 ERCC-00016 844 ERCC-00017

Re: Issue values dictionary

2013-06-04 Thread alex23
On Jun 5, 12:41 pm, claire morandin claire.moran...@gmail.com wrote: But I have a problem storing all size length to the value size as it is always comes back with the last entry. Could anyone explain to me what I am doing wrong and how I should set the values for each dictionary? Your code

Re: Issue values dictionary

2013-06-04 Thread claire morandin
@alex23 I can't thank you enough this really helped me so much, not only fixing my issue but also understanding where was my original error Thanks a lot -- http://mail.python.org/mailman/listinfo/python-list