A

Admin • 833K Points
Coach

Q. Which of the following is the correct way to define a class in Python?

  • (A) class A[]:
  • (B) def A():
  • (C) class A():
  • (D) object A{}
  • Correct Answer - Option(C)
  • Views: 34
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

Classes in Python are defined using `class ClassName():`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.