Skip to content

Tag Archives: python-file-handling

In this article, we are going to see how to read text files into lists in Python. File for demonstration: Example 1: Converting a text… Read More
In this article, we will code a python script to find duplicate files in the file system or inside a particular folder.  Method 1: Using… Read More
In this article, we are going to write a Python program to copy all the content of one file to another file in uppercase. In… Read More
In this article, we will discuss how to read TSV files in Python. Input Data: We will be using the same input file in all… Read More
The with keyword in Python is used as a context manager. As in any programming language, the usage of resources like file operations or database… Read More
In this article, we are going to see how to delete the specific lines from a file using Python Throughout this program, as an example,… Read More
Sometimes it becomes tough to remove brackets from the text file which is unnecessary to us. Hence, python can do this for us. In python,… Read More
Python language has great uses today in almost every field, it can be used along with other technologies to make our lives easier. One such… Read More
Getting a filename from Python using a path is a complex process. i.e, In Linux or Mac OS, use “/” as separators of the directory… Read More
A directory is capable of storing multiple files and python can support a mechanism to loop over them. In this article, we will see different… Read More
In Python, there are many methods available to this comparison. In this Article, We’ll find out how to Compare two different files line by line.… Read More
In this article, we will learn “How to print all files within a directory using Python?”. To do this task we are using the os… Read More
In this article, we are going to discuss various approaches to keep old content while writing files in Python. We can keep old content while… Read More
In this article, we are going to discuss various approaches to get the size of a folder using python. To get the size of a… Read More
In this article, we are going to see how to search for a string in text files using Python Example: string = "GEEK FOR GEEKS"… Read More

Start Your Coding Journey Now!