medium
Code Simplification
Refactor a complex function to improve readability and reduce complexity.
📝 프롬프트 내용
Refactor the following Python function to make it more readable and efficient by breaking it down into smaller helper functions or using list comprehensions where appropriate: def calculate_total_price(items, tax_rate): total = 0; for item in items: price = item['price'] * item['quantity']; if item['taxable']: price = price * (1 + tax_rate); total += price; return total