R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the scope of a variable defined inside a function?

  • (A) Global
  • (B) Class-level
  • (C) Function-level (local)
  • (D) Module-level
  • Correct Answer - Option(C)
  • Views: 1
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma
Variables defined inside a function are local to that function by default.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.