title: Creating a static class with no instances
body: <p>All of the tutorials I see online show how to create classes with <code>__init__</code> constructor methods so one can declare objects of that type, or instances of that class.</p>
  
  <p>How do I create a class (static in Java) so that I can access all methods and attributes of that class <em>without</em> having to create new instances/objects?</p>
  
  <p>For example:</p>
  
  <pre><code>class World:
  
      allElems = []
  
      def addElem(x):  
  
          allElems.append(x)
  
  World.addElem(6)
  print(World.allElems)
  </code></pre>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <pre><code>class World(object):
  
      allAirports = []
  
      @staticmethod
      def initialize():
  
          f = open(os.path.expanduser("~/Desktop/1000airports.csv"))
          file_reader = csv.reader(f)
  
          for col in file_reader:
  
              allAirports.append(Airport(col[0],col[2],col[3]))
  </code></pre>
  
  <p>error: name 'allAirports' is  not defined</p>