I'm trying to make a cash register, but when I do the tax, I want to have it with two decimal places, instead of something like $3.006743
I tried to do this:
elif item == 'done':
    os.system('cls')
    tprice = sprice * 1.13
    hst = tprice - sprice
    if tprice >= 1:
        tprice = tprice[0:5]
    elif tprice >= 10:
        tprice = tprice[0:6]
    elif tprice >= 100:
        tprice = tprice[0:7]
    if hst >= 1:
        hst = hst[0:5]
    elif hst >= 10:
        hst = hst[0:6]
    elif hst >= 100:
        hst = hst[0:7]
    print(receipt)
But I get the error. Any help?
 
     
     
    