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

The State of 2019

PHP vs Python: Which one to choose in 2020?

Understanding Recursion to Become a More Efficient Programmer

Basics of Git Flow (featuring Emacs and Magit!)

Embark on a NoOps Journey: Mitigate Alert Fatigue with Botmetric Incidents, Actions, & Triggers

Humans of Rootee Health: Aditya Rustagi

A Guide for Beginner About Software Quality Assurance

A few things you could use to improve your software development experience

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

Python Template & Concept of Do while loop in Python.

Saving your Audible books to MP3 using Python, Colab, and AAXtoMP3

Solving a capacitated vehicle routing problem with Google OR-Tools and Mapbox

Keywords and Identifiers in Python