title: OOP in python programming, I keep getting an error message about defining main()
body: <pre><code>def main():
      name = input("What would you like to name your character?")
      print("Your character has been created!")
      play = Player(name)
  
  
  
  class Player():
      """A game player"""
  
  
  
      def __init__(self, name, items, max_items = 7):
          self.__name = name
          self.__items = []
          self.__max_items = 7
  
  
      def __str__(self):
          return self.__name
  
  
      def charInfo(self):
          print("This is your character's name:", self.__name)
  
      def inventory(self):
          if len(self.__items) &gt; 7:
              print ("Your iventory is:")
              print (self.__items)
          else:
              print("There's nothing in your inventory.")
  
      def take(self, add_item):
          if self.__items &lt;= self.__max_items:
              self.__items.append(add_item)
          else:
              print("You already have the max items in your inventory,sorry")
  
      def drop(self, drop_item):
          if drop_item not in self.__items:
              print("That item isn't in your inventory.")
          else:
              self.__items.remove(drop_item)
  
  choice = None
  while choice != 0:
  
      print(""" Character Menu
              0 - Quit
              1 - Character Information
              2 - Inventory
              3 - Add an item
              4 - Drop an item""")
  
      choice = input("What would you like to do?")
  
      #Exit
      if choice == "0":
          print("See you later!")
  
      #Character Information
      elif choice == "1":
          play.charInfo()
  
      #Inventory
      elif choice == "2":
          play.inventory()
  
      #Add an item
      elif choice == "3":
          add_item = input("What would you like to add to your inventory?")
          add_item = add_item.lower()
          play.take(add_item)
  
      #Drop an item
      elif choice == "4":
          drop_item = input("What item would you like to drop?")
          drop_item = drop_item.lower()
          play.drop(drop_item)
  
  main()
  input("\nPress enter to exit.")
  </code></pre>
  
  <p>I keep getting this error message and I'm not understanding why. It looks to me as if I've defined the main(). I'm trying to see if someone can help me understand why I'm getting this error message. I'm new to python</p>