Advertisements
Advertisements
Question
Give the statement to check whether the attribute str exists in the class Test whose object is T1.
Very Short Answer
Advertisements
Solution
hasattr(T1, "str")
shaalaa.com
Is there an error in this question or solution?
