LearnFrenzy
Sign in Take a free test

Python Built-in Functions · Predict the Output · Question 12

What is callable? Answer, explanation & discussion

  • Output
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

What is the output of the following Python program?

main.py
print(callable(len), callable("text"), callable(lambda: 0), callable(int), callable(str.upper))
  • A True False True False True
  • B True True True True True
  • C True False False True False
  • D True False True True True Correct
Correct Answer: Option D

Functions, lambdas, classes (int) and methods can all be called; a string cannot.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links