1 Answer

0 votes
by

Self is a keyword in Python used to define an instance or an object of a class. In Python, it is explicity used as the first paramter, unlike in Java where it is optional. It helps in disinguishing between the methods and attributes of a class from its local variables.

Related questions

0 votes
    What will be the output of the following Python code? class tester: def __init__(self, id): self.id = str(id) id="224" >>>temp ... >>>print(temp.id) a) 12 b) 224 c) None d) Error...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What will be the output of the following Python code? class tester: def __init__(self, id): self.id = str(id) id="224" >>>temp ... >>>print(temp.id) a) 12 b) 224 c) None d) Error...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    I'm learning the Python programming language and I've come across something I don't fully understand. In a method ... know very much. Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    What is Self Hosting in WCF?...
asked Jul 26, 2021 in Technology by JackTerrance
0 votes
    What is a self-referential structure?...
asked Jan 17, 2021 in Technology by JackTerrance
0 votes
0 votes
    What is a self-relationship in Salesforce?...
asked Nov 12, 2020 in Technology by JackTerrance
0 votes
    What is the difference between underscore and self (i.e self.xx and _xx) ?...
asked Nov 10, 2020 in Technology by JackTerrance
+1 vote
    What is a self-referential structure in C-Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    Automation empowers frequent releases and self-service. (1)False (2)True...
asked Oct 26, 2020 in Technology by JackTerrance
0 votes
    In self organizing network, how is layer connected to output layer? (a) some are connected (b) all are one to one ... (d) none of the mentioned Please answer the above question....
asked Aug 27, 2022 in Education by JackTerrance
0 votes
    To increase agricultural production and become self-sufficient with regard to food grains .. was initiated. ... (d) White revolution Please answer the above question....
asked Aug 14, 2022 in Education by JackTerrance
0 votes
    Choose the appropriate alternative and complete the following statements. The principle of self-determination of nations' ... , Jean Bodin) Please answer the above question....
asked Aug 4, 2022 in Education by JackTerrance
0 votes
    As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 9, 2022 in Education by JackTerrance
0 votes
    There is only one question related to this and it is more about which one is better. I just don't ... exactly lies the difference? Select the correct answer from above options...
asked Jan 27, 2022 in Education by JackTerrance
...