Which of the following methods have to be defined in a class to make it act like a context manager?Questions & Answers › Category: Programming Language › Which of the following methods have to be defined in a class to make it act like a context manager? 0 Vote Up Vote Down Adam asked 3 years ago Which of the following methods have to be defined in a class to make it act like a context manager? a. enter, quit b. enter, exit c. __enter__, __exit__ d. __enter__, __quit__Share this:Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Pinterest (Opens in new window)Like this:Like Loading...1 Answers 1 Vote Up Vote Down Lokesh Kumar Staff answered 3 years ago c. __enter__, __exit__Share this:Click to share on Facebook (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Pinterest (Opens in new window)Like this:Like Loading...