How to make every object in a list a float
Question: I'm using Python 2. When I try to multiply objects in a list it just repeats
the same thing twice even though i have tried to use this to resolve the
issue:

    
    
    map(float, prices)
    

The code i'm using is:

    
    
    import urllib
    from bs4 import BeautifulSoup
    
    prices = []
    htmlfile = urllib.urlopen("http://www.fifacoin.com/default/quick/listwithcategoryid?        category_id=6").read()
    soup = BeautifulSoup(htmlfile)
    for item in soup.find_all('tr', {'data-price': True}):
        prices.append(item['data-price'])
    
    map(float, prices)
    print prices[1] * 2
    

This code just outputs the value of prices 2. I'm new to Python so it's
probably something obvious


Answer: `map` does not change the original list; it simply returns a new list. Try:

    
    
    prices = map(float, prices)
    

