title: Display the output below using string dunder?
body: <p>I am trying to display all the items in the expenditures list belonging to the same category then followed by the total of each category and lastly, the overall total. For example:</p>
  
  <pre><code>$12.00 Mon, 12 Aug 2019 Food
  $15.25 Mon, 12 Aug 2019 Food
  Total for Food = $27.25
  $8.40 Wed, 14 Aug 2019 Drinks
  Total for Drinks = $8.40
  $33.00 Tue, 13 Aug 2019 Entertainment
  Total for Entertainment = $33.00
  Overall Total = $178.55
  </code></pre>
  
  <p>This is my code thus far. What I am trying to do is put all the items from the category into a dictionary with all the details and another where it is just the amount so I can sum it up.</p>
  
  <pre><code>class ExpenditureList:
      _types = ['Food','Entertainment', 'Drinks']
      def __init__(self):
          self._expenditures = []
  
      @classmethod
      def ExpenditureTypes(cls):
          return cls._types
  
      def __str__(self):
          exp = {}
          amount = {}
          temp = None
          for types in ExpenditureList._types:
              exp[types] = []
              amount[types] = []
          for item in self._expenditures:
              if item._type == ExpenditureList._types[0]:
                  exp[item._type].append(item)
                  amount[item._type].append(item._amount)
              elif item._type == ExpenditureList._types[1]:
                  exp[item._type].append(item)
                  amount[item._type].append(item._amount)
              elif item._type == ExpenditureList._types[2]:
                  exp[item._type].append(item)
                  amount[item._type].append(item._amount)
  </code></pre>
  
  <p>This is as far as I have gone and I'm not sure how do I return to get the above output</p>