Python - Encapsulation and Data Protection
What will be the output of this code?
class Car:
def __init__(self):
self.__speed = 0
def set_speed(self, speed):
self.__speed = speed
def get_speed(self):
return self.__speed
car = Car()
car.set_speed(50)
print(car.get_speed())