How object of user defined class is Stored in a File in Python?

Like, in C++ we explicitly typecast the object to char* type before writing/reading it to the text file using write/read functions.
But I don’t get how can I store an object of a user defined class in Text File.

Hey @abhijeetthakur1111_80e9e08c04cbabb0,
I think you have posted this doubt on wrong video, either ask the doubt on right video or explain your doubt clearly.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.