1.

What is the output of the following program?

Answer»

class Sample:

_num=10

def disp(self):

print(self._num) 

S=Sample( )

S.disp( )

print(S._num)

Output:

Error: Sample has no attribute S._num

10



Discussion

No Comment Found