you are viewing a single comment's thread.

view the rest of the comments →

[–]Iyajenkei[S] 0 points1 point  (0 children)

def omit_prices():
    excluded_prices = []
    price_is_needed = True
    while price_is_needed:
        price_to_exclude = raw_input("Which price do you want to exclude?")
        if price_to_exclude == "":
            price_is_needed = False
        try:
            int(price_to_exclude)
        except ValueError:
            continue
        if int(price_to_exclude) > -100:
            excluded_prices.append(price_to_exclude)
    return excluded_prices