#51 Python Tutorial for Beginners | Constructor, Self and Comparing Objects

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 399

  • @harish7548
    @harish7548 4 года назад +59

    In 2016-17 learned java just by watching your videos got job and now these (company) guys want me to learn Python ...I was like not an issue navin is there you are always there for me ..the only one I really felt like professor for me

    • @Uplift_001
      @Uplift_001 5 месяцев назад

      Hello sir ,
      Can you tell me that if I learn only python will I get a work from home job of ₹30 per month?

  • @newgoblin49
    @newgoblin49 6 лет назад +163

    I'm not going to watch the entire thing but I have to say that your videos are extremely good. I haven't seen anyone else take the time and effort how you have taken

    • @deepaksodhi1395
      @deepaksodhi1395 4 года назад +1

      true..!!

    • @jeetenderkakkar7570
      @jeetenderkakkar7570 3 года назад +1

      1000

    • @pandu7820
      @pandu7820 2 года назад

      We are saying c1.update() that means from this we can say we want to change the c1 (object1) then why we need self
      Pls help me

    • @newgoblin49
      @newgoblin49 2 года назад

      @@pandu7820 stfu, I already cleared engineering and I’m working now and you’re asking me all this ?

    • @rajatverma3692
      @rajatverma3692 2 года назад

      @@pandu7820 bhai c1.update() ka matlab hi yhi hai ki update ko call kr rhe hain ham aur c1 object as a parameter ja rha hai usme..... To jaha kahi bhi update function hai waha pe object type ka parameter hona chahiye to take input via argument ....to usko accept krne ke lie self lagana pada

  • @bloke3253
    @bloke3253 5 лет назад +78

    Thank you for explaining so well without any fee 🙌🙌.

  • @mohankumar-fm1kg
    @mohankumar-fm1kg 4 года назад +30

    wow your lectures made me toooo addicted to python, expecting more videos for different libraries in pythoon!

  • @harithareddy1731
    @harithareddy1731 5 лет назад +20

    I never like any coding...Once I started your watching your videos it seems very easy for me...Very talented Sir ...Your teaching was really awesome:)

  • @adwaith-rajesh
    @adwaith-rajesh 5 лет назад +19

    if someone asked me "who Is your hero". I will say its Navin Reddy sir , The person who inspired me... Thank you so much sir... You are a hero..

  • @bapunmalik3747
    @bapunmalik3747 4 года назад +1

    i am a beginner in your tutorial and i have no experience in programming as i am a physics student.during each video of your i learn something and also able to create.i have made a area calculator and some simple stuffs........thanks sir for your coaching for without any fee.....i will always grateful to you

  • @ArmanKhan-tx4gi
    @ArmanKhan-tx4gi 5 лет назад +14

    Hands down , the best python tutorial i've ever came across.

  • @harishthalluri211
    @harishthalluri211 5 лет назад +6

    I had no idea what a class does so far. But now I can quickly visualize what it does in the computer. You been so helpful by explaining the stuff in detail(basics). Thanks a lot.

  • @fhdhejeh63
    @fhdhejeh63 5 лет назад +9

    Things are starting to get a bit complicated but still your way of explaining things just makes it easier. Thank you sir.

  • @mahajanvansh
    @mahajanvansh 6 лет назад +11

    I have seen all your lectures of this playlist and I must say I feel confident in python. Thank you so much for all the efforts you have put in to teach newbies like us. It is well deserved for great appreciation. Thank you, again. :)

  • @priyakaul31
    @priyakaul31 5 лет назад +5

    i have been studying python from some really good books. but your explanation of classes and all the concepts related like objects, init, constructor is to the point and just so well conveyed.

  • @stewardjames1772
    @stewardjames1772 5 лет назад +3

    class mine:
    def __init__(self):
    self.yam = int(input("enter an integer"))
    def compare(self,other):
    if self.yam == other.yam:
    return True
    else:
    return False
    paa = mine()
    yam = mine()
    if paa.compare(yam):
    print("they are the same")
    else:
    print("they are different")
    hi! so i did this, just to compare two different integers... and it worked so cool. .... Thanks man. God bless you.

  • @bhadjarahul2285
    @bhadjarahul2285 6 лет назад +8

    you are very talented sir , i love python, your teaching skill is 100/100 .

  • @BoomcoreIsLive
    @BoomcoreIsLive 5 лет назад +14

    Wow!!! Very clear explanation... Thank you so much Navin Sir.

  • @nipuntiwari5517
    @nipuntiwari5517 4 года назад +8

    Hello sir. I am Nipun Tiwari and I am 11 years old. Sir I watched your whole series last year and learned Python and now I am learning Java series. I must admit sir that you are the best teacher in the world because you can teach a naughty child like me to young and old people. We all aliens love you sir. Please continue making more videos. Once again thanks a lot sir and we love u sir.

  • @msms3260
    @msms3260 4 года назад +1

    Greatly helpful! Please don’t stop making these videos ever. From looking at the comments obviously you are doing a great service. May God bless you.

  • @piyushpatil2668
    @piyushpatil2668 3 года назад +1

    I used to hate OOPs, but now I changed my mind just because of you sir.
    Keep up the good work. You're the best.

  • @shivendrarajawat9517
    @shivendrarajawat9517 4 года назад

    Hey, this guy is genius, master, great teacher, I know python and I have read many books in python, but what he explained in last 11 minutes I have to read 2 to 3 books and spent time on internet to learn the same .. new learners must watch his videos...I am overwhelmed...great

    • @shivendrarajawat9517
      @shivendrarajawat9517 4 года назад

      Naveen Sir, please explain __new__ with __init__ as new is constructor and init is initializer in python.

  • @shobhitpandey8821
    @shobhitpandey8821 4 года назад +2

    After watching your videos every Concept become crystal clear,thanks for your Incredible effort, even one cannot understand these stuff by joining so called coaching Institute.🙏

  • @faizrock5659
    @faizrock5659 4 года назад +1

    if i had seen this last to last year.....i wouldn't have paid a dime to online platforms......these are the best

  • @theneverwas2835
    @theneverwas2835 3 года назад

    You said it perfectly in two words, it is the "current instance." That helps me visualize it better now than I could before. Thank you.

  • @ankitaggarwal4260
    @ankitaggarwal4260 4 года назад +44

    Rasode mai kon tha?
    Answer- 5:00
    😂😂

  • @mailsidney
    @mailsidney 2 года назад +1

    Thank you so much for your videos. They make learning easy. I am an amateur programmer but always struggled with the "self" concept. Finally a instructor who can explain it well. Subscribed to your channel.

  • @raghav4858
    @raghav4858 4 года назад +4

    Here is the one liner ,Sir mentioned at 9:40
    compare= lambda self,c:(self.memory==c.memory)

  • @MukilShelby
    @MukilShelby 4 года назад +4

    The only useful thing I am doing in this lockdown is watching your videoz 🌹

  • @carlosvenegas8981
    @carlosvenegas8981 4 года назад +9

    Thank you wish I could have you as a instructor!

  • @sandeelg_lite
    @sandeelg_lite 4 года назад

    I know there are many cuts and takes in your videos. But the pace you maintain doesn't make listeners get bored.

  • @harshsrivastava6591
    @harshsrivastava6591 4 года назад +3

    Thank you sir for this explanation on classes and objects, I went to various resources but nobody explained these concepts like you did.

  • @shyamananth
    @shyamananth 6 лет назад +1

    I have not seen someone explaining the 'self' keyword better than this... Not even the paid tutorials... Thanks a lot !!!

  • @hardishah3442
    @hardishah3442 3 года назад +1

    Watched many videos and just your 1 video made all my concepts clear.. so thankful to u!!!

  • @AnilKumar-pp2yo
    @AnilKumar-pp2yo 5 лет назад +8

    Love how you mess up sometimes using java syntax xD.. but great videos bro ! Extremely helpful

  • @amruth6681
    @amruth6681 4 года назад

    Man you made me addicted to your voice and python... Great job with no fees you are awesome teacher

  • @neomuks
    @neomuks 4 года назад

    i was very confused on how self work and why we have to pass it but your way of explaining made it easy for for me and i think 125700 viewers.

  • @Sumit-cz9fm
    @Sumit-cz9fm 2 года назад

    I was unable to understand constructors for very long time..now it seems clearer...thanka

  • @arunpandian9606
    @arunpandian9606 4 года назад +8

    Got a Wonderful Lectures from you.. Keep doing well..

  • @chinmaydas4053
    @chinmaydas4053 6 лет назад +4

    Sir many thanks for reminding and answering my name & question 🙏🙏..

  • @akshaybaburaj6837
    @akshaybaburaj6837 Год назад +1

    Sir your way of explanation is top class ! Totally made the concepts clear. Thank you

  • @ABMA79
    @ABMA79 4 года назад +2

    your effort to explain is more than amazing, but I am still struggling to understand the concept of classes and objects, I come from OPP environment, object procedural programming, completely different from OOP, object-oriented programming.
    So please explain more about classes and objects and it will be more than enough if you can illustrate through using an example.
    Thanks a lot and I hope to watch that tutorial soon.

  • @rakeshsanthapuri9933
    @rakeshsanthapuri9933 5 лет назад +1

    Love you sir...
    First i didn,t understand any thing .
    Later when i put on paper,as a beginner,its amazing........

  • @shivanipalav3038
    @shivanipalav3038 3 года назад

    I was literally confused what does self do by watching ur video my confusion got cleared.Thank for explaining so well.

  • @vasavihegde5186
    @vasavihegde5186 2 года назад

    Omg! Love the way you explain!!! Never felt this good after watching any python tutorial.

  • @Kennensiemich
    @Kennensiemich 5 месяцев назад

    you only emphasize on the exact point of the subject!!! Bravo 👌👨‍💻

  • @imanolvazquez9146
    @imanolvazquez9146 5 лет назад +5

    Sir you are a Master, a crack a GOD ty so much

  • @rajtheo
    @rajtheo 6 лет назад

    Naveen Sir, I have been watching your videos for the past 4 days. You made some python concepts much clearer that I have not understood before. Only request is please speak little slower. Thanks

  • @AishusAura
    @AishusAura 4 года назад +1

    Thanku so much for your valuable classes sir.... How simply your teaching style.... 🤝❤

  • @kunalpatel8496
    @kunalpatel8496 2 месяца назад

    Thank you !! You have explain the concept in an understandable way.

  • @swapnilborude1412
    @swapnilborude1412 3 года назад

    The videos are far better than any course.learnt a lot

  • @prakashkancharla299
    @prakashkancharla299 4 года назад +1

    We can compare by
    If c1.age==c2.age:
    print("they are same")
    Without defining compare cunction

    • @sohamn2823
      @sohamn2823 4 года назад

      yes i also had the same doubt

  • @sivasurya4149
    @sivasurya4149 4 года назад

    U r best for teaching of phyton.... . No badii like u way of teaching sir..

  • @santiswaroopa3262
    @santiswaroopa3262 3 года назад

    you are God of Computer knowledge , Thanks a lot

  • @chetansoni8620
    @chetansoni8620 3 года назад

    That compare method gives a good explanation about self. Thanks for explaining.

  • @fcnealvillangca7943
    @fcnealvillangca7943 5 лет назад +1

    good explanation and your pronunciation and accent makes your video exciting

  • @shivanshuudeniya3338
    @shivanshuudeniya3338 5 лет назад

    I have to say this you are great at teaching...............

  • @mrigankchugh2096
    @mrigankchugh2096 6 лет назад +1

    your videos are awesome, really appreciate the time you have spent to explain this concept to beginners

  • @sns2451
    @sns2451 3 года назад

    I liked the approach you lectured the concept. It is good. It helped me to understand. Thank you.

  • @pravirkumar2712
    @pravirkumar2712 4 года назад

    Sir ur way of teaching is as beautiful as 💎

  • @kwenamartinkgowa2554
    @kwenamartinkgowa2554 Год назад

    Using a function in a condition could be confusing for first time programmers, under the impression that this tutorials are for first time programmers.
    Rather introduce a variable that will hold the results from the compare method then use that variable in the condition. Yes it will take 1 or 2 more lines and more memory but for explaining purpose it makes thing more simpler. Love the videos by the way

  • @ashrafulalim1272
    @ashrafulalim1272 6 лет назад +1

    Well explained within a short time. Thank you.

  • @marshall7253
    @marshall7253 5 лет назад +2

    You're awesome at explaining man, thanks.

  • @shubhamgohel4647
    @shubhamgohel4647 2 года назад

    best tutor on youtube.
    one request can you please upload or teach live projects on python

  • @rajeshvarma2162
    @rajeshvarma2162 3 года назад

    you are the best tutor in india

  • @storyofstories6341
    @storyofstories6341 4 месяца назад

    Best explanation ever

  • @aman72kamboj
    @aman72kamboj 5 лет назад

    you're the best Teacher Navin

  • @alpapatel5182
    @alpapatel5182 4 года назад +1

    I didn't got everything but I got something from this video
    Thx

  • @aniruddwakikar3004
    @aniruddwakikar3004 4 года назад

    Just one word ...GENIUS

  • @054_ritesh3
    @054_ritesh3 4 года назад +1

    Awsome explanation sir

  • @vedicraghuvanshi1904
    @vedicraghuvanshi1904 4 года назад +2

    sir please remove unwanted spaces then we can see your full code on a single screen and it becomes easy to understand.

  • @papo7936
    @papo7936 Год назад

    Great video as always. There seems to be an important point missing: there is a __eq__ method that classes can implement and with which they can define the behavior of the equality operator ("==").

  • @CarloPiana
    @CarloPiana Год назад

    This is sort of enlightening. Eye opener. Thanks.

  • @easylearninghindi
    @easylearninghindi 4 года назад

    All concepts are cleared.

  • @shivanshuudeniya3338
    @shivanshuudeniya3338 5 лет назад

    Best teaching style

  • @chandu0771
    @chandu0771 4 года назад

    very good.. it's easy to compare with java.. because i was learned java also

  • @sultansaleem5651
    @sultansaleem5651 4 года назад

    Great video sir you explained every thing with absolute simplicity and I have got the true idea of self
    Again thank you sir for this amazing python series🙏

  • @ArunNalluri
    @ArunNalluri 5 лет назад +1

    Thanks for clarifying these concepts! are they same in Java as well??

  • @IndianKhanaa
    @IndianKhanaa 2 года назад

    Hello Navin, thank you for wonderful training in Python. It is helping me a lot.
    I have a question, when we are writing functions and calling them , why do we need to create class and object? OOPs concept is always confusing to me :)

  • @sheikhakbar2067
    @sheikhakbar2067 4 года назад

    One of the best explanations with regard to OOP!

  • @SoulBoxer.
    @SoulBoxer. 4 года назад

    Your videos and efforts are great

  • @nazrulhassan6310
    @nazrulhassan6310 5 лет назад

    hey naveen I had hard time comprehending this 'self' thing but you helped me understanding it thanks

  • @nithyakalyani2327
    @nithyakalyani2327 5 лет назад +1

    Sir pls don't say it's confusing .....
    Your teaching is that nice

  • @vakhariyajay2224
    @vakhariyajay2224 2 года назад

    Thank you very much. You are a genius.

  • @kajalvarshney427
    @kajalvarshney427 5 лет назад +1

    Amazing explanation.....

  • @MrHmm-cv6gs
    @MrHmm-cv6gs 4 года назад

    _init_ gives the objects attributes or variable.
    whereas update(), compare() were two methods or functions which works on objects.
    and self here represents the objects it self,who is calling function.

  • @chessbd
    @chessbd Год назад

    Things are getting complicated but still, it is the best explanation so far!

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 4 года назад

    Really good explaination, understood the concept easily

  • @divyanshusingh6105
    @divyanshusingh6105 4 года назад +4

    Class Navinreddy:
    def python(self):
    self.learn='everything'
    self.practice='Master in py'
    student = Navinreddy()
    student.python()

    • @needlesstorpedo5282
      @needlesstorpedo5282 4 года назад

      class*

    • @arihantjain4344
      @arihantjain4344 4 года назад

      @@needlesstorpedo5282 no dude you should keep first alphabet of the class name capital,as per standards.

  • @JatinKumarJKM
    @JatinKumarJKM 3 года назад

    god bless you and your dear ones navin sir

  • @vijaylokhande4792
    @vijaylokhande4792 2 года назад

    Your videos is very knowledgeable sir.
    Can we use self 2 times in compare method?

  • @raptyaxa5771
    @raptyaxa5771 4 года назад +1

    I always thought that object's variables are encapsulated, that they will always reference to itself first. I never knew that it has to be coded explicitly.

  • @sykconsultancy3024
    @sykconsultancy3024 5 лет назад

    Very nice explanation again.

  • @fouadmoussa3475
    @fouadmoussa3475 2 года назад

    you are the best sir

  • @sanjeevkumar-ty8dx
    @sanjeevkumar-ty8dx 4 года назад

    C1,&C2 ...r ..reference type ,so they will store on Stack,and Objects r stored on Heap(here,--computer) if i m not wrong

  • @misbahjavaid
    @misbahjavaid 4 года назад

    Excellent explanation👍

  • @rgokul6212
    @rgokul6212 4 года назад +1

    Super baya

  • @abhinaba__saha
    @abhinaba__saha 4 года назад

    great concept to puzzle the brain

  • @kosmic000
    @kosmic000 6 лет назад

    amazing description thank u for making it so clear wit examples

  • @chinmayeeojha1108
    @chinmayeeojha1108 3 года назад

    Thank u so much...its extremely good..

  • @SamimHossain-hi9fn
    @SamimHossain-hi9fn 3 года назад

    Nice explanation
    Love you ❤ sir

  • @radosawkowalski2237
    @radosawkowalski2237 3 года назад

    Thank you for this video! You saved my life :D

  • @rishichaturvedi3620
    @rishichaturvedi3620 4 года назад

    very good explanation. really needed this video.