Skip to content

Tag Archives: python-file-handling

Given a text file of key-value pairs. The task is to count the number of occurrences of the key-value pairs in the file. Examples: Input… Read More
Given a binary file that contains some sentences (space separated words), let’s write a Python program to modify or alter any particular word of the… Read More
Filecmp module in Python provides functions to compare files and directories. This module comes under Python’s standard utility modules. This module also consider the properties… Read More
Glob is a general term used to define techniques to match specified patterns according to rules related to Unix shell. Linux and Unix systems and… Read More
The concept of file handling is used to preserve the data or information generated after running the program. Like other programming languages like C, C++,… Read More
The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is… Read More
os.walk() method of the OS module can be used for listing out all the directories. This method basically generates the file names in the directory… Read More
HDF5 file stands for Hierarchical Data Format 5. It is an open-source file which comes in handy to store large amount of data. As the… Read More
Python too supports file handling and allows users to handle files i.e., to read, write, create, delete and move files, along with many other file… Read More
The OS module in Python is used for interacting with the operating system. This module comes under Python’s standard utility module so there is no… Read More
Python provides functionality to move files or directories from one location to another location. This can be achieved using shutil.move() function from shutil module. shutil.move()… Read More
Python provides inbuilt functions for creating, writing, and reading files. There are two types of files that can be handled in Python, normal text files… Read More
The OS module in Python is used for interacting with the operating system. This module comes with Python’s standard utility module so there is no… Read More
Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This module… Read More
File handling is a very important concept for any programmer. It can be used for creating, deleting, moving files or to store application data, user… Read More

Start Your Coding Journey Now!