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 i

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 nitp

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

Re: Issue values dictionary

2013-06-04 Thread alex23
On Jun 5, 12:41 pm, claire morandin 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 has two for loops, on