in Python by
Q:
Which of the following statements is correct in this python code?

class Name:  

    def __init__(javatpoint):  

        javajavatpoint = java  

name1=Name("ABC")  

name2=name1  

i)  It will throw the error as multiple references to the same object is not possible

ii)  id(name1) and id(name2) will have same value

iii)  Both name1 and name2 will have reference to two different objects of class Name

iv)  All of the above

► Click here to show 1 Answer

0 votes
by

ii)  id(name1) and id(name2) will have same value

Python
Learn More with Madanswer

Related questions

0 votes
asked Jan 13 in Python by SakshiSharma
...