Data Hiding and Object Printing in Python– Part 10

preview_player
Показать описание
In this video, we will learn about:

1. Data hiding:

In Python, we use double underscore (Or __) before the attributes name and those attributes will not be directly visible outside.

2. Printing Objects
In Java, we use toString() method. In python this can be achieved by using __repr__ or __str__ methods.

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

WebServices API Automation Tutorials:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
-------------------------------

✔️SOCIAL NETWORKS
--------------------------------

Support My Channel✔️Or Buy Me A Coffee
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Рекомендации по теме
Комментарии
Автор

I am waiting eagerly for next Python video. I have covered all the video so far for Selenium, Java, Python, Agile etc. Thanks a lot for for hard work. Hats off to you Man!!!

shubhishukla
Автор

I am the one who is clicking LIKE button without seeing video 😍 that's how I like videos from naveen bhai. zazakallah Bhai always love to watch ur videos

shareefshaik
Автор

Hi Naveen, I want to join the paython cource .may i know the fees and timing?or provoid the inq details

nitinkasture
Автор

Hi Naveen, can you tell me the purpose of blank class

harishms
Автор

Hi, I was able to access hidden content using method too.


class employee:
__salary=1000 # Double underscore used before variable

def p(self):
__price=500 # data hiding
self.__price=__price+50
return __price



e1=employee()


print(e1.p()) #We can access this hidden (__price) using function method


Please let me know why its happening ..

rahultripathi