Classes and Objects in Python | Python Tutorial - Day #57

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 1,4 тис.

  • @tatyavinchu69
    @tatyavinchu69 9 місяців тому +44

    self ka matlab wo object jiske liye koi method call kia ja raha hai i.e
    [self parameter is an reference to the current instance of the class and is used to access variables that belong to the class]

  • @SaiGaneshPulijala
    @SaiGaneshPulijala 4 місяці тому +11

    This will be good for vs users:-
    # A class is a blueprint or a template for creating objects, providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods). The user-defined objects are created using the class keyword.
    class info:
    name = "ganesh"
    age = 17
    print(info()) #We cant print the matter inside the class like this or without bracket.
    #We can print the info present in the class like this:-
    print(info.name)
    print(info.age)
    # Creating an Object:
    # Object is the instance of the class used to access the properties of the class Now lets create an object of the class:-
    a = info()
    print(a.name)
    print(a.age)
    # changing the object:-
    b = info()
    b.name = 'Rohan'
    b.age = 18
    print(b.name)
    print(b.age)
    # Self Parameter:-
    # The self parameter is a reference to the current instance of the class, and is used to access variables that belongs to the class.
    # It must be provided as the extra parameter inside the method definition.
    class person:
    name = "Enter your name"
    age = "Enter your age"
    def intro(self):
    print(f"My name is {self.name} iam {self.age} years old.")
    c = person()
    c.name = 'Ganesh'
    c.age = 17
    d = person()
    d.name = 'Rohan'
    d.age = 18
    c.intro()
    d.intro()

  • @ritvikvoleti
    @ritvikvoleti Рік тому +10

    Self parameter is used to refer to the the current instance of the class or the object for which the method is called.

  • @radhesyambeats..7939
    @radhesyambeats..7939 Рік тому +3

    the self parameter us a reference to the current instance of the class, and is used to access variable that belongs to the class
    it must be provided as the extra parameter inside the method definition

  • @shubhamacharya1513
    @shubhamacharya1513 10 місяців тому +2

    Self is a reference to the current instance of the class and is use to access variable that belong to the particular class.

  • @KrishnaPaul-s4t
    @KrishnaPaul-s4t 11 місяців тому +1

    self matlab referring to the object for which that class method is being called. Thanks Harry Bhai, I tried lots of documents and videos to understand this self, but you have explained it in a best possible way.

  • @bholegaming5195
    @bholegaming5195 Рік тому +10

    self means - it's the current instance of the class and is used to access variables that belongs to that class. thanks for clearing my doubts

    • @WinzzPlayzz
      @WinzzPlayzz 4 місяці тому

      Bro aapne ye emoji kese use Kiya custom wala?

  • @Funny_videos-h9
    @Funny_videos-h9 Рік тому +4

    self parameter is used to refer to the current instance of class or object for which the method is called

  • @svk0071
    @svk0071 2 місяці тому +1

    Self parameter is a reference to the current instance of class and is used to access variables that belong to that class. (Self ka matlab woh object jis ke liye koi method call kia ja raha hai)

  • @sumithivale4414
    @sumithivale4414 Рік тому +7

    The meaning of self :-
    The self parameter is a reference to the current instance of the class, and is used to access variables that belongs to the class.

    • @rokckerzzzz6080
      @rokckerzzzz6080 Рік тому

      Is it same like this keyword in JavaScript?

    • @Godfatherhemanth2369
      @Godfatherhemanth2369 Рік тому

      @@rokckerzzzz6080 object oriented programming is same for all languages u just need basics of it

  • @rishabhpandey5623
    @rishabhpandey5623 Рік тому +38

    I took data science course from PW skills , but i am learning from here and I understand better. Thanks harry bhai.. ❤❤❤

    • @vishalsen7345
      @vishalsen7345 Рік тому +4

      Same Bro! I took course from AlmaBetter but I am learning here! Course is only for road map!

    • @wewesusui9528
      @wewesusui9528 Рік тому +2

      Us moment bhai i took it from datamites

    • @maths6859
      @maths6859 Рік тому +2

      Data science me konse topic tak tum pahuch gae bhai

    • @prathameshmainkar2226
      @prathameshmainkar2226 Рік тому +1

      @@vishalsen7345 how is the almabetter course? is their job guarentee claim true??

    • @prathameshmainkar2226
      @prathameshmainkar2226 Рік тому +1

      how is the pw skills course?

  • @AliHaider-xx2hm
    @AliHaider-xx2hm 11 місяців тому +1

    the self parameter is the current instance of the class. it is used to access the variables that belong to the class

  • @mariamhasan3733
    @mariamhasan3733 Рік тому +4

    Day #57 done. The self parameter in Python classes refers to the instance of the class being created, allowing access to its attributes and methods.

  • @teekamchand4370
    @teekamchand4370 Рік тому +11

    "Self" refers to the object which is followed by a class method.

  • @aksaismail1873
    @aksaismail1873 Рік тому +6

    Thanks Harris brother for clearing oop in a brilliant way,it is admirable.

  • @mohdfaisal4725
    @mohdfaisal4725 9 місяців тому +1

    self parameter is a reference to the current instance or object of the class and it is used to access variables belonging to that class.

  • @pratikshelke7493
    @pratikshelke7493 Рік тому +5

    The self parameter is a reference to the current instance of the class, and is used to access variables that belongs to the class.

  • @smilekr3689
    @smilekr3689 6 місяців тому

    self jo use kry ghy function wo usy class ky object ko refer kry ghy like class Students and with student_info() then a.student_info() jb kry ghy agr to self a ko refer kry gha agr a mei koi object banaya ho gha to wo aa jhy gha self mei werna by default jo class mei diya hai wo utha ky gha

  • @tomaatoo137
    @tomaatoo137 Рік тому +8

    Self parameter is the object/instance for which the method is being called🙂

  • @abhaypatil2517
    @abhaypatil2517 Рік тому +18

    Self parameter is "Vo wala object jiske liye method call kiya ja raha hai". Writing in hindi to remember more efficiently :)

  • @alakhmanipriya5861
    @alakhmanipriya5861 Рік тому +6

    Please after the this 100 days series please make dart programming playlist 😔

  • @alinaqvi786
    @alinaqvi786 Рік тому +10

    Hii herry bro ❤️
    I hear very carefully when you talk your experience because i am implementing in my coding journey life.
    So thanks

  • @anonymous-ss8yc
    @anonymous-ss8yc Рік тому +5

    Great lecture brother ❤️❤️❤️

  • @indianpc8602
    @indianpc8602 Рік тому +1

    'self' refers to the current instance of the class (i.e the object) on which the method is called.

  • @prasannarajpaulmaddala5674
    @prasannarajpaulmaddala5674 Рік тому +5

    Bro, please make a ultimate Java course plz
    We(cse) are having Java as major
    Please make asap bro
    I 💕 your content and way of teaching bro
    Keep doing
    This python course is very helpful for my friends (other dept as well as for us)

    • @devpandya7903
      @devpandya7903 Рік тому

      Ohh bhai playlist dekho harry bhai ki he already have one playlist of java

    • @cube6325
      @cube6325 Рік тому

      He do have Java course, but it is kinda bit old.

  • @bhupendranarayansinha3323
    @bhupendranarayansinha3323 Рік тому +1

    self parameter is a refrence to current instance of the class . It used to access to the variable that belongs to the class.

  • @parwatsingh677
    @parwatsingh677 Рік тому +4

    OP python course 👌👌

  • @arjunpawar3389
    @arjunpawar3389 4 місяці тому +1

    self ka matlab vo object jiske liye koye method call kiya hai -->
    self parameter is an reference to the current instance of the class and used to access variable that belongs to the class

  • @vibesofficial5169
    @vibesofficial5169 Рік тому +6

    self - vo object jiske liye ye method call ho rha hai.

  • @digvijayjadhav1452
    @digvijayjadhav1452 Рік тому +2

    self parameter is a reference to the current instance of that class and is used to access variables that belong to that class

    • @sumedhbirare5709
      @sumedhbirare5709 Рік тому

      I was a bit confused but your definition helped😅

  • @ashirwadsharma8279
    @ashirwadsharma8279 3 місяці тому +3

    Self ka matlb Vo Object jiske liye Method Call Horaha h

  • @pranavmehta9141
    @pranavmehta9141 8 місяців тому

    self keyword is used to represent the instance(object) of a class, by using self keyword we can access the attributes and methods of a class.

  • @devanshtanwar4075
    @devanshtanwar4075 4 місяці тому

    the self parameter is that object on which this method is being called(The self parameter is a reference to the current instances of the class,and is used to access variables that belongs to the class .

  • @SaiGaneshPulijala
    @SaiGaneshPulijala 4 місяці тому +1

    self parameter is a reference to a class which is used to access the variables belonging to that class

  • @shashank.4705
    @shashank.4705 Рік тому

    6:21 ,Sir we can also write print statement also this way less complex print(self.name ,"given a salary", self.salary) rather than in Curly Brackets

  • @IslamicXkardash
    @IslamicXkardash Рік тому

    Self' is used to refer to the current instance of the class i.e. the object for which the method is called

  • @AkashKumar-c2l8k
    @AkashKumar-c2l8k 9 місяців тому

    self parameter is reference to the current instance of the class and used to access the variables that belong to the class

  • @devendrapatel5255
    @devendrapatel5255 7 місяців тому

    self is the current instance of the class and it is used to access the variable that belongs to class

  • @DivyamPyMaster
    @DivyamPyMaster Рік тому +1

    Self ka matlab woh object jis pr ye method call ho raha hai
    Thank you so much Harry bhai

  • @HammerHead-oq5de
    @HammerHead-oq5de 6 місяців тому

    self ka matlab voh object jiske liye method call kia ja raha hai. [ self parameter is used to access the current instance of the class and is used to access variables and methods that belong to that class]

  • @TejaswiniGajbhiye-e3t
    @TejaswiniGajbhiye-e3t Рік тому

    self is reference to current instance of the class, and used to access variables that belongs to class.

  • @URcristianoooooooooooo
    @URcristianoooooooooooo Рік тому

    Self is a keyword used to access variable made in method

  • @ragingogre759
    @ragingogre759 9 місяців тому

    self parameter is an reference to the current instance of the class and is used to access variables tht belongs to the class

  • @INSPECTOR_Thakur
    @INSPECTOR_Thakur 4 місяці тому

    self parameter is the refrence to the current instance of the class and is used to access variables that belongs to the class 7:41

  • @randomai-i1
    @randomai-i1 3 місяці тому

    i have done it like this class detials:
    name = input("Enter your name: ")
    occupation = input("Enter your occupation: ")
    salary = input("Enter your salary: ")
    gender = input("Enter your gender: ")
    if gender == "Male" or gender == "male":
    gender = "he"
    elif gender == "Female" or gender == "female":
    gender = "she"
    print(f"{detials.name} is a {detials.occupation} and {detials.gender} earns {detials.salary}")

  • @Akhildesignsbuddy
    @Akhildesignsbuddy 10 місяців тому

    self parameter is reference to current instance of class it can be use to acess variable belong to that class

  • @Rayan-n1d7g
    @Rayan-n1d7g 10 місяців тому

    Self parameter is a instance of class and is used to acess variables that belong to the calss

  • @falgunisunke4814
    @falgunisunke4814 Рік тому

    self refers to the current instance of that class and the object for which the method is called.

  • @loju-z9o
    @loju-z9o 9 місяців тому

    print("self parameter is a reference to current instance of class and is used to access variables that belong to class
    THANK YOU harry bhai and done with day 57

  • @Love_ff_7
    @Love_ff_7 4 місяці тому

    'self' means that object for which the method is called ie. self ka matlab wo object jiske liye method call kiya ja raha hai.
    [self parameter is a reference to the current instance of the class and is used to access the variable that belongs to the class.]

  • @misahhere9224
    @misahhere9224 Рік тому

    Self is for referring the object for which the method has been called

  • @SlayerXD-rz3lv
    @SlayerXD-rz3lv 11 місяців тому

    self method is used to call the blueprint (class) for particular instance

  • @Helly04
    @Helly04 Рік тому +1

    Self means "that object" on which "the created method" is being called.

  • @hereyoufindentertainment8879

    self parameter is used to refer the object for which function is to be called.

  • @dheerajsharma-of8xs
    @dheerajsharma-of8xs Рік тому

    Self is used for refering current instance of Class or object for which the method is called....

  • @Aditya-tv2gr
    @Aditya-tv2gr Рік тому +1

    self means that object in which the method is being called.

  • @SuryakantaSahoo-mg6ss
    @SuryakantaSahoo-mg6ss 2 місяці тому

    self means allowing access to its attributes and methods

  • @samakshgarg3408
    @samakshgarg3408 11 місяців тому

    self parameter is the refrence to the current instance for which the method is called

  • @muskanthakur633
    @muskanthakur633 Рік тому

    self object is used to refer to current instance of the class and the object for which the method is called

  • @EmpowerTheVoice
    @EmpowerTheVoice 9 місяців тому

    class person:
    def info (self):
    print (f"{self.name} is a {self.occupation}")
    #objects creation
    a = person ()
    a.name = "Shais"
    a.occupation = "Pyhthon Developer"
    a.info()
    b = person ()
    b.name = "Atta ur rehman"
    b.occupation = "Laptop Technician"
    b.info()
    c = person ()
    c.name = "Molana"
    c.occupation = "Graphic Designer"
    c.info()

  • @narendraparmar1631
    @narendraparmar1631 10 місяців тому +1

    Very Informative
    Thanks Harry

  • @rajgurubhosale8680
    @rajgurubhosale8680 Рік тому

    we can understand self as a current object on which we are using method

  • @Benz-yg3yz
    @Benz-yg3yz 4 місяці тому

    Self is a parameter that is used to provide info. Of current instance

  • @pavanofficial8431
    @pavanofficial8431 5 місяців тому

    self ka matlab wo object jiske liye koi call kia ja raha hai
    (self parameter is an reference to the current instance of the class and is used to access variable that belong to the class)

  • @PawannShorts21
    @PawannShorts21 Рік тому +1

    Self means the currunt instance of the variable

  • @fearlessbantai4846
    @fearlessbantai4846 3 місяці тому +1

    self means that object for which method is callled
    self ka matlab wo object jiske liye koi method calll kia ja raha hai

  • @sanskarkhandelwal
    @sanskarkhandelwal 10 місяців тому

    Self parameter is a reference to the current instance of the class ,and is used to access variables that belongs to the class , jis par method call ho rha h

  • @ayushshaw1755
    @ayushshaw1755 7 місяців тому

    Self is a reference to that object for which the method is being called.

  • @jain-gl5jt
    @jain-gl5jt 6 місяців тому

    self ka matlab woh object jispe ye mathod call ho raha hai
    and thanks harry bhai me aapko 2021 se follow kar raha hoon us samay me class 11 me tha aaj college(iit madras) me study kar raha hoon galti se aapka channel mila tha aaj me proud se boltha hoon meri galti achi thi

  • @52_PrathmeshPawar
    @52_PrathmeshPawar 4 місяці тому

    self is reference to current instance of class used to access variable belong to that class.

  • @RK15508
    @RK15508 Рік тому +1

    Self ka matlab vo object jis ke liye mathod call Kiya jaa Raha hai and is ko (.)Operator se access karte hai

  • @AdarshKamble-yb2hd
    @AdarshKamble-yb2hd 4 місяці тому +2

    Self point the current object of class

  • @aadibansal1837
    @aadibansal1837 Рік тому +1

    'Self' is used to refer to the current instance of the class i.e. the object for which the method is called.

  • @Tariquejamallkr
    @Tariquejamallkr Рік тому

    self ka matlab "wo object jis per ye method call ho rha hai"
    Self refers to the objects on which the method is being called.

  • @madhanmohan9386
    @madhanmohan9386 4 місяці тому +1

    Self is the object that is calling the method in a class

  • @EmpowerTheVoice
    @EmpowerTheVoice 9 місяців тому

    love from pakistan its been 57th lecture i am learning python from you i must say you are best then my university professors

  • @bhavyajethi5297
    @bhavyajethi5297 11 місяців тому

    self parameter means that parameter by which we can refer to an object by calling a method.

  • @krishr8599
    @krishr8599 Рік тому

    self is a parameter which is used to call the object in a class at that instance

  • @dishasolanki8893
    @dishasolanki8893 5 місяців тому

    self ka matlab vo object jiske liye method call kiya ja raha he......self parameter is an reference to the current instance of the class and is used to access variables that belong to the class

  • @therandomiser9809
    @therandomiser9809 2 місяці тому

    Self is the reference to the current instance/object of the class

  • @ashutoshpatel2048
    @ashutoshpatel2048 Рік тому

    self means that it will run function for that class in which it is called.

  • @ZaidIlyas-y1z
    @ZaidIlyas-y1z 4 місяці тому +1

    self means that object for whom the the method is called.

  • @dhruvgupta2801
    @dhruvgupta2801 Рік тому

    self is a object on which method is called, a reference for the object inside the class functions.

  • @adeebaalam7266
    @adeebaalam7266 10 місяців тому

    Self is the object for which the particular method is being called

  • @atharvajawalkar9078
    @atharvajawalkar9078 Рік тому

    self parameter is reference to current instance of the class for which method is called

  • @mansibarewar6295
    @mansibarewar6295 7 місяців тому

    self parameter :=> object on which a method is being called

  • @funnyvines4560
    @funnyvines4560 9 місяців тому

    self means that object for which method(function) is being called.

  • @ThomasShelby47270
    @ThomasShelby47270 8 місяців тому +1

    Self refers to the current object information

  • @drashmiranjan738
    @drashmiranjan738 6 місяців тому

    self ka matlab wo object jishka liye method call kiya ja raha hai
    self parameter is an reference to the current instance of the class and is used to access variables that belong to the class

  • @virendragawande7757
    @virendragawande7757 Місяць тому

    Harry Bhai 1 no course hai ❤,

  • @deepakjha9933
    @deepakjha9933 5 місяців тому

    Herry bhai manana padega yar apko, gajab samjhate ho.... Heads off to u bro....

  • @shammirawat2351
    @shammirawat2351 Рік тому

    self is a method which is used to call current object in class

  • @kunalthakare3517
    @kunalthakare3517 Рік тому

    self use for the calling the class's function for that particular object

  • @simisarkar82
    @simisarkar82 3 місяці тому

    #self means the object by which the method is being is being called

  • @MrUtilityGuru
    @MrUtilityGuru 10 місяців тому

    The meaning of self is the reference of the desired string.

  • @skalwaghe56
    @skalwaghe56 3 місяці тому

    Self means the object we are using, or the function will be using

  • @swarupyeole4984
    @swarupyeole4984 Рік тому

    Self is refrence to current instance(object) of class.

  • @AkritiGupta-b1b
    @AkritiGupta-b1b 4 місяці тому

    self wo object jiskeliye wo methos call kiya ja raha hai
    self para meter is a reference to a current instance of the class. It use to access the variable that belong to the class.

  • @helloeveryone6614
    @helloeveryone6614 2 місяці тому +1

    Self ka mtlb wo object jiske liye method call kiya ja rha h.❤

  • @abhisiktaghosh6607
    @abhisiktaghosh6607 4 місяці тому +1

    Awesome harry bhaiya ❤