up:: [[Python MOC]] # Use multiple context managers in Python In Python, you can use multiple context managers on the same block. To do that, simply separate the context manager declarations with a comma. ```python with context_manager1 as ctx1, context_manager2 as ctx2: do_stuff() ``` ## Source [[Research Data Migration#^v7ydkf|Original note]]