Published in


Encapsulation in Python

Encapsulation = wrapping the data

The OOPs the usage of encapsulation is very normal and easy. It is important to access the value of the variable through the function.

In the following simple example, we can get the value of name using get_name() function.

Some real time example like the following can explain the real importance of the encapsulation.




Recommended from Medium

Python3: Logging With Multiprocessing

Here’s why you should always use Constraint Layout for creating complex layouts in Android

Certification helper GCP — MemoryStore

AWS Fargate Scaling with Target Tracking Policy

How to set up role-based access control for Azure Service Bus in C#

CS371g Blog 4

How to Get a Log of DNS Queries with Sysmon

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


» 6+ years of experience in Data engineering, Dashboard designing » 3+ years of experience in Web application development

More from Medium

Comprehensions in Python

Intro — What is Tkinter ?

Exeption Handling in Python