Write a program to find out the name of an object in python.
Answer Posted / chaitanya
The object doesn’t have any name and there is no way the can be found out for objects. The assignment is used to bind a name to the value that includes the name of the object that has to be bound by a value. If the value is callable then the statements are made true and then the program followed can be used to find the reference name of an object.
class try:
pass
B = A
a = B()
b = a
print b
<__main__.try instance at 0x16D07CC>
print b
The class consists of name and the names are invoked by using the the variable B that creates an instance for the class try. The method is to find out from all the namespaces that the object exists and then print the name of the object.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by list comprehension?
Is it better to learn python or java?
What does a function of python programming?
What is the purpose of the single underscore “_” variable in python?
Why is python weakly typed?
What is the purpose of the "//" operator in python?
Is numeric in python?
How many kinds of sequences are supported by python? What are they?
Can we use python in linux?
How do you use enums in Python?
How do you debug a program in python? Is it possible to step through python code?
Can I create apps with python?
How can we make forms in python?
Why anaconda is used for python?
Is python is easy?