Let's see, the print is just "debug", it's not necessary in the program.

'row[0]' is the first element of the current row. Ex.: row = ['a', 'b',
'c', 'd'] - row[0] would be 'a'

'rates' is a dictionary, 'rates[row[0]]' would update the key row[0] in the
dict with the 'value'

I think that's it, right?


2014-08-30 22:37 GMT-03:00 Danny Yoo <d...@hashcollision.org>:

> As the error message suggests, the problem might be near line 40.
>
>
> Look at lines 40 and 41 in your program.
>
>                 print(rates[row[0]] + " / VALUE : " + str(value))
>                 rates[row[0]] = value
>
> Look at it very carefully, and try to explain to yourself what those
> two lines mean.
>
> What do you _want_ to happen when those two statements execute?
>
> What does "row[0]" mean?
>
> What does "rates[row[0]]" mean?
>
> Do you notice something strange?
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to