---
title: "Discussion on \"Files in Python\" | Hashnode"
description: "Discussion on \"Files in Python\". f = open(\"test.txt\",'w')\nhere we open test.txt in write mode.\npwd - Shows present Working directory:\n'/home/jovyan/work'\n\nls - shows the list of files in directory\nREADME.md  sample-code.ipynb  test.txt  Untitled.ipynb\n\nw - truncate\na - append"
url: "https://hashnode.com/posts/files-in-python/64ef0c35705d830cfb3928fc"
---

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

Discussion

# [Files in Python](https://karansss.hashnode.dev/files-in-python?utm_source=hashnode&utm_medium=feed)

f = open("test.txt",'w') here we open test.txt in write mode. pwd - Shows present Working directory: '/home/jovyan/work' ls - shows the list of files in directory README.md sample-code.ipynb test.txt Untitled.ipynb w - truncate a - append

Aug 30, 2023 · 1 min read · karansss.hashnode.dev  
Read the article

-   [#python3](https://hashnode.com/tag/python3)

## Written by

[Karan Thakkar](https://hashnode.com/@karansss)

@karansss

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
