title: TypeError: tuple indices must be integers or slices, not str
body: <p>I need to make a function that updates tuples in a list of tuples. The tuples contain transactions, which are characterised by ammount, day, and type. I made this function that should completely replace a tuple with a new one, but  when I try to print the updated list of tuples I get the error:</p>
  
  <pre><code>TypeError: tuple indices must be integers or slices, not str
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>def addtransaction(transactions, ammount, day, type): 
      newtransactions = {
          "Ammount": ammount,
          "Day": day,
          "Type": type
          }
     transactions.append(newtransaction)
  
  def show_addtransaction(transactions):
       Ammount = float(input("Ammount: "))
       Day = input("Day: ")
       Type = input("Type: ")
      addtransaction(transactions, ammount, day, type)
  
  def show_all_transaction(transactions):
      print()
      for i, transaction in enumerate(transactions):
          print("{0}. Transaction with the ammount of {1} on day {2} of type:     {3}".format(
              i + 1,
              transaction['Ammount'], ; Here is where the error occurs.
              transaction['Day'],
              transaction['Type']))
  
  def update_transaction(transactions): ; "transactions" is the list of tuples
      x = input("Pick a transaction by index:") 
      a = float(input("Choose a new ammount:"))
      b = input("Choose a new day:")
      c = input("Choose a new type:")
      i = x
      transactions[int(i)] = (a, b, c)
  
  addtransaction(transactions, 1, 2, service)
  show_all_transaction(transactions)
  update_transaction(transactions)
  show_all_transaction(transactions)
  </code></pre>