title: How to add an object to a list created within a class
body: <p>I'm learning about classes. I created an Item class which defines statistics for an item, for example a sword. I also created a Player class, with an inventory for items. I added a super_sword to the Item class and now I would like to add super_sword to Player inventory. I receive the following error: </p>
  
  <pre><code>        line 16, in add_item
      item.append(inventory)
  AttributeError: 'Item' object has no attribute 'append'
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>class Item:
      def item_stats():
          base_dmg = 0
          magic_dmg = 0
  
  #--- Create an item super_sword and assign damage attributes ---#
  super_sword = Item() 
  super_sword.base_dmg = 10
  super_sword.magic_dmg = 12
  
  class Player:
  
      inventory = []
  
      def add_item(self, item):
          item.append(inventory)
  
  #--- Create some_character and add super_sword to its inventory ---#
  some_character = Player()
  some_character.add_item(super_sword)
  </code></pre>