Thank you so much Tim. This is precisely what I wanted to do!
On Thursday, January 23, 2014 9:00:23 PM UTC+5:30, Tim Chase wrote:
> On 2014-01-23 07:15, Ayushi Dalmia wrote:
>
> > I need to initialise a dictionary of dictionary with float values.
>
> > I do not know the size of the dictionary b
On 2014-01-23 10:34, Dave Angel wrote:
> Unsure of what the floats have to do with it. Perhaps you meant
> float KEYS.
using floats for keys can be dangerous, as small rounding errors in
math can produce keys different enough that they're not found by an
exact-match lookup. But yeah, the origin
On 2014-01-23 07:15, Ayushi Dalmia wrote:
> I need to initialise a dictionary of dictionary with float values.
> I do not know the size of the dictionary beforehand. How can we do
> that in Python --
Either
d = {}
or, if you want
from collections import defaultdict
d = defaultdict(float)
I need to initialise a dictionary of dictionary with float values. I do not
know the size of the dictionary beforehand. How can we do that in Python
--
https://mail.python.org/mailman/listinfo/python-list