#Python #Shorts
Since Python is a dynamic language, sometimes we may work with data where we have to "guess" whether a property (or attribute) of an object exists and perform some logic based on that condition. Python has a `hasattr` method that takes in an object to check against, and the name of the property as the second argument.
-------------------------------------------------------------------------------------
Links:
Blog: https://evgenyurubkov.com
Twitter: / evgenyurubkov
Instagram: / evgenyurubkov
Youtube: / @codevev