You love coffee and want to know what beans you can afford to buy it.

The first argument to your search function will be a number which represents your budget.

The second argument will be an array of coffee bean prices.

Your 'search' function should return the stores that sell coffee within your budget. 

The search function should return a string of prices for the coffees beans you can afford. The prices in this string are to be sorted in ascending order.

Difficulty: introductory

Starter code:

def search(budget,prices):
	

Solutions:
def search(budget, prices):
    return ','.join(str(a) for a in sorted(prices) if a <= budget)


search = lambda budget, prices: ",".join(map(str, sorted([x for x in prices if x <= budget])))

def search(budget, prices):
    return ",".join(map(str, sorted([n for n in prices if n <= budget])))

def search(budget, prices):
    return ','.join(map(str, sorted(filter(float(budget).__ge__, prices))))

search = lambda b,p: ','.join(str(i) for i in sorted(p) if i<=b)

def search(b,p):
    return','.join(map(str,sorted(c for c in p if c<=b)))

def search(budget,prices):
    return ','.join(str(num) for num in sorted(prices) if num <= budget)

def search(budget,prices):
    prices.sort()
    return ','.join(str(x) for x in prices if x<=budget)

def search(budget,prices):
    return ','.join(map(str, sorted(price for price in prices if price <= budget)))

def search(budget,prices):
    return ",".join(str(price) for price in sorted(prices) if price <= budget)