title: How to declare a global variable in Python?
body: <p>I have an attribute in my class  </p>
  
  <pre><code>class MITCampus(Campus):
      """ A MITCampus is a Campus that contains tents """
      def __init__(self, center_loc, tent_loc = Location(0,0)): 
  
          """ Assumes center_loc and tent_loc are Location objects 
          Initializes a new Campus centered at location center_loc 
          with a tent at location tent_loc """
  
          Campus.__init__(self,center_loc)
  
  
  
      def add_tent(self, new_tent_loc):
          """ Assumes new_tent_loc is a Location
          Adds new_tent_loc to the campus only if the tent is at least 0.5 distance 
          away from all other tents already there. Campus is unchanged otherwise.
          Returns True if it could add the tent, False otherwise. """
          # Your code here
  </code></pre>
  
  <p>In order to keep track of the locations I create a new variable know as tent_list = []. But the problem is that whenever a new instance of the MITCampus is created and the add_tent is called the tent_list is reset to empty list.  </p>
  
  <blockquote>
    <p>Please help!!</p>
  </blockquote>