Python Morsels make_file exercise: Context manager to create a temporary file| www.pythonmorsels.com
Python Morsels cd exercise: Context manager for temporarily changing directories| www.pythonmorsels.com
Python Morsels iospy exercise: Utilities to merge file streams and spy on I/O| www.pythonmorsels.com
Python Morsels Timer exercise: Context manager to time blocks of code| www.pythonmorsels.com
Sign up for Python Morsels to improve your Python skills in just 60 minutes every week.| www.pythonmorsels.com
Sign in to your Python Morsels account.| www.pythonmorsels.com
Unlike traditional C-style for loops, Python's for loops don't have indexes. It's considered a best practice to avoid reaching for indexes unless you really need them.| www.pythonmorsels.com
An iterable is anything you're able to iterate over (iter-able). Iterables can be looped over and anything you can loop over is an iterable. Not every iterable is indexable or has a length.| www.pythonmorsels.com
Source code: Lib/contextlib.py This module provides utilities for common tasks involving the with statement. For more information see also Context Manager Types and With Statement Context Managers....| Python documentation