Encapsulation is the binding of data and functions that manipulate the data.
It is a process of wrapping up data and variables together.
example
class playercharacter():
def __init__(self,name,age):
self.name = name
self.age = age
player1 = playercharacter(‘leo’,25)
print(player1.name)
print(player1.age)