मराठी

Give the statement to check whether the attribute str exists in the class Test whose object is T1.

Advertisements
Advertisements

प्रश्न

Give the statement to check whether the attribute str exists in the class Test whose object is T1.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

hasattr(T1, "str")
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 3: Classes in Python - EXERCISE [पृष्ठ ६३]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 3 Classes in Python
EXERCISE | Q 16. a. | पृष्ठ ६३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×