Posts from Python

How to delete a file in Python with examples

By Saruque Ahamed Mollick

In this tutorial, we will learn how to delete a file in Python. We will be using the below methods: os.remove os.unlink Using os.remove to delete a file from a directory in Python .... Read More

How to read a specific line from a text file in Python

By Saruque Ahamed Mollick

This tutorial is going to show you how to read a specific line from a text file in Python using two different ways. In the first example, we will see how to perform this task using.... Read More

Top 5 Reasons To Learn Python As Your First Programming Language

By Arpit Gupta

There are several popular programming languages to learn. But people get confused when they think about which programming language should learn first. They often try to find the ea.... Read More

How to count the number of lines in a text file in Python

By Saruque Ahamed Mollick

In order to learn how to count the number of lines in a text file in Python, you have to understand the open()function in Python. In this tutorial, we will learn to count the numbe.... Read More

How to create a text file in Python

By Saruque Ahamed Mollick

To create a text file in Python you will need to work with the file object. In order to create a text file and add some text content in this file, you will need to use two inbuilt .... Read More

How to generate random number in Python

By Saruque Ahamed Mollick

Python has its own module to generate a random number. The module is the random module. By using this special module you can easily generate random number in Python. In this tuto.... Read More

Concept of Inheritance, Superclass and Subclass in Python

By Neha Mishra

Here we are going to learn the basic concepts of Inheritance in Python. In order to understand what inheritance is we should first dive in superclass and subclass. Concept of Inher.... Read More

Simple Example of Linear Regression With scikit-learn in Python

By Faruque Ahamed Mollick

Linear Regression is a linear approach which is useful for finding a relationship between predictor or independent variable and response or dependent variable. In simple word, if.... Read More

Related Posts