0 votes
in Python by

What is the output of the following code?

class A:

    def __init__(self, x):

        self.__x = x

    @property

    def x(self):

        return self.__x

a = A(7)

a.x = 10

print(a.x)

1) 10

2) AttributeError  

3) None

4) 7

1 Answer

0 votes
by

2) AttributeError 

Related questions

0 votes
asked Sep 4, 2021 in Python by SakshiSharma
0 votes
asked Jan 18, 2021 in Python by SakshiSharma
...