---
title: "Discussion on \"'with' keyword in Python\" | Hashnode"
description: "Discussion on \"'with' keyword in Python\". When I tried this keyword I wondered what could be used for that keyword, but when I found out that this is pretty much a fantastic feature given by python to use.\nIt is basically a shorthand for avoiding cleanup code. Suppose I am writing something ..."
url: "https://hashnode.com/posts/with-keyword-in-python/63f448582666da73951ae09d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# ['with' keyword in Python](https://madhu003.hashnode.dev/with-keyword-in-python?utm_source=hashnode&utm_medium=feed)

When I tried this keyword I wondered what could be used for that keyword, but when I found out that this is pretty much a fantastic feature given by python to use. It is basically a shorthand for avoiding cleanup code. Suppose I am writing something ...

Feb 21, 2023 · 1 min read · madhu003.hashnode.dev  
Updated Jul 25, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python3](https://hashnode.com/tag/python3)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Madhu Soodan](https://hashnode.com/@madhu003)

@madhu003 · Jaipur, Rajasthan, IN

  
[View profile](https://hashnode.com/@madhu003)

Associate Staff Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
