Examveda

Is the following Python code valid?
class B(object):
  def first(self):
    print("First method called")
  def second():
    print("Second method called")
ob = B()
B.first(ob)

A. It isn't as the object declaration isn't right

B. It isn't as there isn't any __init__ method for initializing class members

C. Yes, this method of calling is called unbounded method call

D. Yes, this method of calling is called bounded method call

Answer: Option C


This Question Belongs to Python Program >> Classes And Objects In Python

Join The Discussion

Related Questions on Classes and Objects in Python