# Define initial dictionary products = {'shoes': 100, 'watch': 50, 'smartphone': 250, 'tablet': 120} # Define threshold max_price = 150 # Filter for threshold products_to_buy = {fruit: price for fruit, price in products.items() if price <= max_price} # Print filtered dictionary print(products_to_buy) >>> {'shoes': 100, 'watch': 50, 'tablet': 120}