filmov
tv
Check if Python object has attribute 🐍 #shorts

Показать описание
How do you check if a Python object has a given attribute? Use the built-in function hasattr( object, 'attribute_name'), passing in object and the attribute name as a string.