Write a python function to calculate the price after tax for a list of transactions


Topic: Write a python function to calculate the price after tax for a list of transactions

Solution

txns = [1.09, 23.56, 57.84, 4.56, 6.78]
TAX_RATE = .08
def get_price_with_tax(txn):
    return txn * (1 + TAX_RATE)
final_prices = list(map(get_price_with_tax, txns))
print(f"{final_prices}")



List all Python Programs