callable() checking object callable or not

Returns Booleans, True if callable , False otherwise.
print(callable(a)) # False
print(callable(x)) # False
print(callable(my_list)) # False 
All above objects are not Callable. Using Class and Objects
class student_kit():
    #instance attributes
    def __init__(self,name): name
Alex=student_kit('Alex')  # object declaration
print(callable(student_kit)) # True
print(callable(Alex)) # False , object is not callable
#Alex()   # this will generate error 
The last line will generate error like this.
TypeError: 'student_kit' object is not callable
The class student_kit is callable, the object Alex is not callable.
All Built in Functions in Python bytes()

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer