[Tutor] How do I fix this IndexError?
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Fri Dec 16 23:49:25 CET 2005
> import pickle
> rates = {'can_us' : 0.80276,
> 'us_can' : 1.245702,
> 'can_euro' : 1.488707,
> 'euro_can' : 0.671724}
>
> def save_rates(exch):
> store = open("exch.txt",'w')
> pickle.dump(conv,rate)
> store.close()
Hi Nathan,
You may want to double check the use of pickle.dump(). I'm not sure I'm
understanding what values are being passed here: what is 'conv' and what
is 'rate' here?
More information about the Tutor
mailing list