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

  Рет қаралды 562,239

Telusko

Telusko

Күн бұрын

Пікірлер: 403
@harish7548
@harish7548 4 жыл бұрын
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 7 ай бұрын
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 жыл бұрын
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 жыл бұрын
true..!!
@jeetenderkakkar7570
@jeetenderkakkar7570 3 жыл бұрын
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 жыл бұрын
Thank you for explaining so well without any fee 🙌🙌.
@mohankumar-fm1kg
@mohankumar-fm1kg 4 жыл бұрын
wow your lectures made me toooo addicted to python, expecting more videos for different libraries in pythoon!
@harithareddy1731
@harithareddy1731 5 жыл бұрын
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 жыл бұрын
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..
@harishthalluri211
@harishthalluri211 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.
@ArmanKhan-tx4gi
@ArmanKhan-tx4gi 5 жыл бұрын
Hands down , the best python tutorial i've ever came across.
@mahajanvansh
@mahajanvansh 6 жыл бұрын
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. :)
@fhdhejeh63
@fhdhejeh63 5 жыл бұрын
Things are starting to get a bit complicated but still your way of explaining things just makes it easier. Thank you sir.
@bapunmalik3747
@bapunmalik3747 4 жыл бұрын
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
@priyakaul31
@priyakaul31 6 жыл бұрын
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 жыл бұрын
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.
@piyushpathak1186
@piyushpathak1186 5 жыл бұрын
if you can explain why it works
@raghav4858
@raghav4858 4 жыл бұрын
Here is the one liner ,Sir mentioned at 9:40 compare= lambda self,c:(self.memory==c.memory)
@nipuntiwari5517
@nipuntiwari5517 4 жыл бұрын
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.
@bhadjarahul2285
@bhadjarahul2285 6 жыл бұрын
you are very talented sir , i love python, your teaching skill is 100/100 .
@BoomcoreIsLive
@BoomcoreIsLive 5 жыл бұрын
Wow!!! Very clear explanation... Thank you so much Navin Sir.
@msms3260
@msms3260 4 жыл бұрын
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.
@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.
@faizrock5659
@faizrock5659 5 жыл бұрын
if i had seen this last to last year.....i wouldn't have paid a dime to online platforms......these are the best
@piyushpatil2668
@piyushpatil2668 3 жыл бұрын
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.
@shobhitpandey8821
@shobhitpandey8821 4 жыл бұрын
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.🙏
@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.
@mailsidney
@mailsidney 3 жыл бұрын
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.
@shyamananth
@shyamananth 6 жыл бұрын
I have not seen someone explaining the 'self' keyword better than this... Not even the paid tutorials... Thanks a lot !!!
@hardishah3442
@hardishah3442 3 жыл бұрын
Watched many videos and just your 1 video made all my concepts clear.. so thankful to u!!!
@carlosvenegas8981
@carlosvenegas8981 4 жыл бұрын
Thank you wish I could have you as a instructor!
@aashishmalhotra
@aashishmalhotra 5 ай бұрын
Thanks!
@aashishmalhotra
@aashishmalhotra 5 ай бұрын
Thanks for your contribution in community.
@harshsrivastava6591
@harshsrivastava6591 4 жыл бұрын
Thank you sir for this explanation on classes and objects, I went to various resources but nobody explained these concepts like you did.
@amruth6681
@amruth6681 4 жыл бұрын
Man you made me addicted to your voice and python... Great job with no fees you are awesome teacher
@MukilShelby
@MukilShelby 4 жыл бұрын
The only useful thing I am doing in this lockdown is watching your videoz 🌹
@rakeshsanthapuri9933
@rakeshsanthapuri9933 5 жыл бұрын
Love you sir... First i didn,t understand any thing . Later when i put on paper,as a beginner,its amazing........
@Sumit-cz9fm
@Sumit-cz9fm 2 жыл бұрын
I was unable to understand constructors for very long time..now it seems clearer...thanka
@AnilKumar-pp2yo
@AnilKumar-pp2yo 6 жыл бұрын
Love how you mess up sometimes using java syntax xD.. but great videos bro ! Extremely helpful
@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.
@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.
@ankitaggarwal4260
@ankitaggarwal4260 4 жыл бұрын
Rasode mai kon tha? Answer- 5:00 😂😂
@Telusko
@Telusko 4 жыл бұрын
Mein thi.. Tum thi... Kaun tha??? 😂
@ankitaggarwal4260
@ankitaggarwal4260 4 жыл бұрын
@@Telusko The moment I thought you couldn't get any better😍 Even any paid tutor will not be able to teach this good❤️
@karangothwal5296
@karangothwal5296 4 жыл бұрын
ye rashi
@sohamn2823
@sohamn2823 4 жыл бұрын
@@ankitaggarwal4260 haha XD
@mentanagavenkatasrinivas9245
@mentanagavenkatasrinivas9245 4 жыл бұрын
😂🤣
@akshaybaburaj6837
@akshaybaburaj6837 2 жыл бұрын
Sir your way of explanation is top class ! Totally made the concepts clear. Thank you
@arunpandian9606
@arunpandian9606 4 жыл бұрын
Got a Wonderful Lectures from you.. Keep doing well..
@sivasurya4149
@sivasurya4149 4 жыл бұрын
U r best for teaching of phyton.... . No badii like u way of teaching sir..
@vasavihegde5186
@vasavihegde5186 2 жыл бұрын
Omg! Love the way you explain!!! Never felt this good after watching any python tutorial.
@Kennensiemich
@Kennensiemich 6 ай бұрын
you only emphasize on the exact point of the subject!!! Bravo 👌👨‍💻
@kunalpatel8496
@kunalpatel8496 3 ай бұрын
Thank you !! You have explain the concept in an understandable way.
@santiswaroopa3262
@santiswaroopa3262 4 жыл бұрын
you are God of Computer knowledge , Thanks a lot
@shivanipalav3038
@shivanipalav3038 3 жыл бұрын
I was literally confused what does self do by watching ur video my confusion got cleared.Thank for explaining so well.
@AishusAura
@AishusAura 4 жыл бұрын
Thanku so much for your valuable classes sir.... How simply your teaching style.... 🤝❤
@swapnilborude1412
@swapnilborude1412 3 жыл бұрын
The videos are far better than any course.learnt a lot
@shivanshuudeniya3338
@shivanshuudeniya3338 5 жыл бұрын
I have to say this you are great at teaching...............
@imanolvazquez9146
@imanolvazquez9146 5 жыл бұрын
Sir you are a Master, a crack a GOD ty so much
@chinmaydas4053
@chinmaydas4053 6 жыл бұрын
Sir many thanks for reminding and answering my name & question 🙏🙏..
@chetansoni8620
@chetansoni8620 3 жыл бұрын
That compare method gives a good explanation about self. Thanks for explaining.
@alpapatel5182
@alpapatel5182 4 жыл бұрын
I didn't got everything but I got something from this video Thx
@fcnealvillangca7943
@fcnealvillangca7943 5 жыл бұрын
good explanation and your pronunciation and accent makes your video exciting
@shubhamgohel4647
@shubhamgohel4647 2 жыл бұрын
best tutor on youtube. one request can you please upload or teach live projects on python
@ABMA79
@ABMA79 4 жыл бұрын
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.
@pravirkumar2712
@pravirkumar2712 4 жыл бұрын
Sir ur way of teaching is as beautiful as 💎
@ArjunKalidas
@ArjunKalidas 5 жыл бұрын
At 7:34, you are explaining about c1.Computer() and you were saying how will the compiler know which object I am referring to. It is obviously c1 right. Unless I am calling by Computer.update(), I have to define by saying Computer.update(c1).
@rajeshvarma2162
@rajeshvarma2162 3 жыл бұрын
you are the best tutor in india
@mrigankchugh2096
@mrigankchugh2096 6 жыл бұрын
your videos are awesome, really appreciate the time you have spent to explain this concept to beginners
@chandu0771
@chandu0771 4 жыл бұрын
very good.. it's easy to compare with java.. because i was learned java also
@CarloPiana
@CarloPiana Жыл бұрын
This is sort of enlightening. Eye opener. Thanks.
@aniruddwakikar3004
@aniruddwakikar3004 4 жыл бұрын
Just one word ...GENIUS
@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🙏
@sns2451
@sns2451 3 жыл бұрын
I liked the approach you lectured the concept. It is good. It helped me to understand. Thank you.
@054_ritesh3
@054_ritesh3 4 жыл бұрын
Awsome explanation sir
@chessbd
@chessbd 2 жыл бұрын
Things are getting complicated but still, it is the best explanation so far!
@marshall7253
@marshall7253 5 жыл бұрын
You're awesome at explaining man, thanks.
@ashrafulalim1272
@ashrafulalim1272 6 жыл бұрын
Well explained within a short time. Thank you.
@Name123-k7d
@Name123-k7d 5 жыл бұрын
you're the best Teacher Navin
@sheikhakbar2067
@sheikhakbar2067 4 жыл бұрын
One of the best explanations with regard to OOP!
@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
@storyofstories6341
@storyofstories6341 6 ай бұрын
Best explanation ever
@prakashkancharla299
@prakashkancharla299 4 жыл бұрын
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
@debjyotibanerjee7750
@debjyotibanerjee7750 4 жыл бұрын
Really good explaination, understood the concept easily
@tuhinsde
@tuhinsde 4 жыл бұрын
Sir, I might sound cheap but 8:40 describes compare is not a in-built method. vowel problems :) should be an.
@nazrulhassan6310
@nazrulhassan6310 5 жыл бұрын
hey naveen I had hard time comprehending this 'self' thing but you helped me understanding it thanks
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius.
@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 ("==").
@SoulBoxer.
@SoulBoxer. 4 жыл бұрын
Your videos and efforts are great
@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
@JatinKumarJKM
@JatinKumarJKM 3 жыл бұрын
god bless you and your dear ones navin sir
@minchalaganesh89
@minchalaganesh89 Ай бұрын
# what is self? # self is used to refers to the current object reference or current instance # It allows you to access instance variables and methods from within a class. class computer: def __init__(self): name = "naveen" age = 28 c1 = computer() print(c1.name) Error message:AttributeError: 'computer' object has no attribute 'name' why c1.name is not get executed? because you are not refering to any instance or object reference to bind these(name & age) two variable and their values in it. so that name = "naveen" & age = 28 will treated as Local variables with in __init__ method. This is the reason why c1 object has no attributes class computer: def __init__(self): self.name = "naveen" self.age = 28 c1 = computer() print(c1.name,c1.age) output: Naveen 28 Here, we self use to refer the current object reference and self inside the __init__ method is responsible for binding the instance variables like name & age to Objects whenever a new object is created.
@dev9559
@dev9559 4 жыл бұрын
@06:36 in the video. You said, we are not mentioning which Object is calling Update function but you are mentioning i.e.. c1.update() which object c1 is calling the update function. Can you please explain that a bit.
@satyajaiswal7372
@satyajaiswal7372 6 жыл бұрын
Hi naveen, Whats the use of self in that update method when called by c1. If update method is called from object c1 then it implicitly means c1 is calling ..No need of self
@akshatagaonkar4788
@akshatagaonkar4788 5 жыл бұрын
I also have same question
@albertmusayev5343
@albertmusayev5343 5 жыл бұрын
Yes , you are right , self is implicit , when c1 calls , the function put c1 in self and then do operations with others .
@easylearninghindi
@easylearninghindi 4 жыл бұрын
All concepts are cleared.
@rishichaturvedi3620
@rishichaturvedi3620 4 жыл бұрын
very good explanation. really needed this video.
@SamimHossain-hi9fn
@SamimHossain-hi9fn 3 жыл бұрын
Nice explanation Love you ❤ sir
@kosmic000
@kosmic000 6 жыл бұрын
amazing description thank u for making it so clear wit examples
@kajalvarshney427
@kajalvarshney427 5 жыл бұрын
Amazing explanation.....
@chinmayeeojha1108
@chinmayeeojha1108 3 жыл бұрын
Thank u so much...its extremely good..
@radosawkowalski2237
@radosawkowalski2237 3 жыл бұрын
Thank you for this video! You saved my life :D
@shivanshuudeniya3338
@shivanshuudeniya3338 5 жыл бұрын
Best teaching style
@Rudra-go6us
@Rudra-go6us 3 жыл бұрын
another awesome video. great. thank you.
@vedicraghuvanshi1904
@vedicraghuvanshi1904 4 жыл бұрын
sir please remove unwanted spaces then we can see your full code on a single screen and it becomes easy to understand.
@sykconsultancy3024
@sykconsultancy3024 5 жыл бұрын
Very nice explanation again.
@abhinaba__saha
@abhinaba__saha 5 жыл бұрын
great concept to puzzle the brain
@baqirhusain5652
@baqirhusain5652 5 жыл бұрын
love u sir....watching a single video made me subscribe your channel
@bijenadhikari
@bijenadhikari 4 жыл бұрын
awesome bro. (LOVE FROM NEPAL)
@nithyakalyani2327
@nithyakalyani2327 5 жыл бұрын
Sir pls don't say it's confusing ..... Your teaching is that nice
@manuelalejandrohermoso4713
@manuelalejandrohermoso4713 4 жыл бұрын
Very helpful! now I got it!
#52 Python Tutorial for Beginners | Types of Variables
4:56
Telusko
Рет қаралды 354 М.
#49 Python Tutorial for Beginners | Class and Object
11:01
Telusko
Рет қаралды 859 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
How I Would Learn Python FAST (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 683 М.
OOP in Python | Object Oriented Programming
1:45:19
Telusko
Рет қаралды 1,8 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 685 М.
Please Master This MAGIC Python Feature... 🪄
25:10
Tech With Tim
Рет қаралды 109 М.
#50 Python Tutorial for Beginners | __init__ method
6:46
Telusko
Рет қаралды 683 М.
While Loop in Python | Python Tutorials for Beginners #lec50
26:51
Jenny's Lectures CS IT
Рет қаралды 93 М.
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,5 МЛН
#63 Python Tutorial for Beginners | Exception Handling
15:59
Telusko
Рет қаралды 543 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 253 М.