Python Tutorial: Context Managers - Efficiently Managing Resources

In this Python Programming Tutorial, we will be learning how to use context managers to properly manage resources. Context Managers are great for when we need to setup or teardown some resources during use. So these can be used for: open and closing files, opening and closing database connections,...

Intermediate - 21 min - Software & IT - Corey Schafer

The full course: Learn Python free

What you'll need

Books

  1. Python Crash Course by Eric Matthes - View on Amazon
  2. Automate the Boring Stuff with Python by Al Sweigart - View on Amazon
  3. Head First Python by Paul Barry - View on Amazon
  4. Fluent Python by Luciano Ramalho - View on Amazon
  5. Learning Python by Mark Lutz - View on Amazon
  6. Python For Data Analysis by Wes McKinney - View on Amazon

Next lessons