How can I create a variable in Python that is shared by all instances of the object?
<p>I want to create a variable in Python that is shared by all instances of object.</p>

<pre><code>class myobj:
  shared = []

  def add(item):
     self.shared.append(item)

  def get():
     return self.shared

item = myobj()
item.add("Hello")

item2 = myobj()
item2.add("Dave")

item.get()  # this should return [Hello, Dave]
item2.get() # this also should return [Hello, Dave]
</code></pre>
