Saved Bookmarks
| 1. |
Give the statement to:1. Check whether the attribute str exists in the class Test whose object is T2. Assign a value “Hello” to the attribute str of class Test and object Tl. |
|
Answer» 1. hasattr (Tl,str) 2. setattr (Tl, str, “Hello”) |
|