Newbie question about lists

Austin Cox exuberant at gmail.com
Wed Jul 20 19:46:19 EDT 2005


Hello, I just started with python and have run into a problem using
lists.

If I enter:
    li = [.25,.10,.05,.01]
and then enter:
    print li
it'll output:
    [0.25, 0.10000000000000001, 0.050000000000000003, 0.01]

Can anyone tell me why it does this, and how I can get just the value
.10, and .05 into a list? Thanks.




More information about the Python-list mailing list