numbers with decimal points - question

Ruslan Spivak alienoid at is.lg.ua
Tue Jan 21 10:01:33 EST 2003


Hello, python-list users!

i've just tried the following

price = {'Mon' : {},
	'Tue' : {}
	}

price['Mon'][0] = 2.7

when i print dict i see:

{'Mon': {0: 2.7000000000000002}, 'Tue': {}}

whats that? why no just 2.7?
Any help and suggestions are very appreciated.

Thanks in advance

	






More information about the Python-list mailing list