How to Get the Basename of a File in Python?

Get the Basename of a File in Python

In this article, I will help you to how to get the basename of a file in Python. As a Python developer, working on a project I often needed to extract the filename from a full file path while dealing with file management tasks. Let us get into the details with some practical examples. Get … Read more >>

How to Create a CSV File in Python?

Create a CSV File in Python

Recently, while working on a data analytics project, I needed to generate daily sales reports from an e-commerce platform. The requirement was to store transaction details in a structured format. Since CSV files are widely used for data exchange and compatibility with spreadsheets and databases. In this tutorial, I will explain how to create a … Read more >>

How to Write Bytes to File in Python?

Write Bytes to File in Python

Recently I faced a real issue while working on a project that required storing user-uploaded images in a database, which led me to explore the best practices to accomplish this task. In this tutorial, I will explain how to write bytes to file in Python with detailed examples. Open a File in Binary Write Mode … Read more >>

How to Read Large CSV Files in Python?

Read Large CSV Files in Python

I faced a challenge to read large CSV files when working on a project that involved analyzing millions of rows of sales data from various states across the USA. In this tutorial, I will explain how to read large CSV files in Python. I will share the techniques and tools that helped me overcome these … Read more >>

How to Create a Python File in Terminal?

Create a Python File in Terminal

In this tutorial, I will explain how to create a Python file in terminal. As a programmer, you often come across creating files and it is important to learn how to create a file in terminal. After researching I found several ways to achieve this task. I will explain the whole process step-by-step with examples … Read more >>

How to Get the Path of the Current File in Python?

Get the Path of the Current File in Python

As a developer working on a project for a US-based company, I recently encountered a situation where I needed to access files relative to the current script’s location. In this article, I will explain how to get the path of the current file in Python. Let us explore different methods to achieve this task with … Read more >>

How to Replace a Specific Line in a File Using Python?

Replace a Specific Line in a File Using Python

Recently while working on a project that involved updating configuration settings stored in a file. I needed an easy way to locate a particular setting based on a keyword and replace that entire line with a new value. In this tutorial, I will explain how to replace a specific line in a file using Python. … Read more >>

How to Call a Function from Another File in Python?

Call a Function from Another File in Python

In this tutorial, I will explain how to call a function from another file in Python. Recently someone asked about calling a function from another file, which made me research this topic and I found several ways to achieve this task. I will share my findings with suitable examples and screenshots. Call a Function from … Read more >>

How to Get the Directory of a File in Python?

Get the Directory of a File in Python

In this tutorial, I will explain how to get the directory of a file in Python. As a software developer working on a project for a US-based company, I recently encountered a situation where I needed to determine the directory path of a specific file. Python provides built-in modules and functions that make this task … Read more >>

How to Get Distinct Values from an Array in TypeScript?

Recently, while working on a Typescript project, I got a requirement to get distinct values from an array in Typescript. In this tutorial, I will explain how to extract distinct values from an array in TypeScript efficiently. There are various methods to get distinct values from an array in TypeScript. Get Distinct Values from an … Read more >>

51 Python Programs

51 PYTHON PROGRAMS PDF FREE

Download a FREE PDF (112 Pages) Containing 51 Useful Python Programs.

pyython developer roadmap

Aspiring to be a Python developer?

Download a FREE PDF on how to become a Python developer.

Let’s be friends

Be the first to know about sales and special discounts.