title: Python function not accessing class variable
body: <p>I am trying to access a class variable in an outside function, however I get the AttributeError, "Class has no attribute"  My codes looks something like this:</p>
  
  <pre><code>class example():
       def __init__():
            self.somevariable = raw_input("Input something: ")
  
  def notaclass():
      print example.somevariable
  
  AttributeError: class example has no attribute 'somevariable'
  </code></pre>
  
  <p>Other questions have been asked similar to this however all the answers said to use self and define during <strong>init</strong>, which I did.  Why can't I access this variable.  </p>