The self Parameter :

Total Post:57

Points:285
Python 
 466  View(s)
Ratings:
Rate this:
  1. Post:57

    Points:285
    The self Parameter :

    The self Parameter :

    The self parameter means a reference to the class itself, it is used to access variables that belongs to the class. 

    Example 

    class Person: 
      def __init__(mysillyobject, name, age):
        mysillyobject.name = name
        mysillyobject.age = age
    def myfunc(mindstick): 
        print("Hello my name is " + mindstick.com)
    p1 = Person("prakash", 19)
    p1.myfunc()

Answer