R

Ram Sharma • 3.40K Points
Extraordinary

Q. What will be printed by this code?

Code:
def f():
pass

print(f())
  • (A) None
  • (B) pass
  • (C) f
  • (D) Error
  • Correct Answer - Option(A)
  • Views: 13
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma
The function `f()` does nothing (it uses the `pass` statement) and returns `None` by default.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.