Learn Python Training from the Best Tutors
Search in
Think about self as a function that i created for myself.(by myself i mean the object) When we use self we are refering to any future instance that we may create and store data. on self we can create any functions and all other things required for that object. self allows us to also access functions of the current class inside the same class.
read less
There are methods and functions in python. Methods specifically refer to functions that are defined within a class or are bound to a particular class. functions on the other hand are not bound to any class and are available globally. So when I am defining a method in a class which needs to call another method inside the same class, how will we do it? If we simply use the method name and pass the parameters it will not work as it will try to find functions defined globally. But if you do self.method_name() then it will work. So this is one scenario that shows the usage of self in python. Using self we can call methods defined inside the current class. Think of the self as a pointer to a class object. So when you do self.method_name() the method_name defined inside the class will execute
read lessRelated Questions
What are the future career opportunities after Python certification courses?
I want to learn Python. but I cant decide which application to choose.I don't understand if I should be a Developer, testing or something else which is the future and which is more in demand.
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Top 5 reasons why you should learn Python
Python is one of the most popular programming languages in the world. It is general-purpose, object oriented, high-level programming language used in a number of programming fields. Python is a great programming language to learn as it will introduce you to the world of programming. If you are from the technical background...
Make a Career as a BPO Professional
Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...
Learn Hadoop and Big Data
Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...
Make a Career in Mobile Application Programming
Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...
Looking for Python Training classes?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for Python Training Classes are on UrbanPro
The best Tutors for Python Training Classes are on UrbanPro