Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
python hasattr function 1

python hasattr function

June 13, 2022June 3, 2022 by Anurag batra
hasattr(object, name)

Here is what the above code is Doing:
1. It’s checking if the object has an attribute with the name name.
2. If it does, it returns True.
3. If it doesn’t, it returns False.

Categories Python Examples
Post navigation
is there find_all method in re or regex module in python?
raise RuntimeError(“populate() isn’t reentrant”)
© MyEduKit - 2022 . All Rights Reserved.