Why its necessary to use any string with dot point with self in class python(self.x=x)? : <p>I am learning oop in python so i am having some problem to understand <code>sefl</code> keyword properly. </p>

<p>Suppose a program :</p>

<pre><code>class ge:
   def __init__(self,a,b):
      self.p=a
      self.l=b
   def ff(self):
      aaa=self.p+self.l
      print(aaa)

hh=ge(1,2)
hh.ff()
</code></pre>

<p>I am confuse why its necessary to use any string with self with dot ? what it means ? Like:</p>

<p>self.a=a and we can change self.a to ay string like self.b , self.c what it means ?? why its necessary ?</p>

<p>My second question is :</p>

<p>what is difference between defining class with parameter and without parameter ?</p>

<pre><code>class hello(object):
   def __init__(self,a,v):
      self.a=a
      self.v=v
   def p(self):
      f=self.a+self.v
      print(f)

he=hello(1,2)
he.p()
</code></pre>

<p>if i defined 
<code>class hello(object)</code> its working but 
if i defined class like:
<code>class hello():</code> its also working 
but if i defined like:
<code>class hello:</code>  its also working </p>

<p>what is the difference class <code>hello(object):</code>  , <code>class hello()</code>, <code>class hello:</code></p>
