Popular Post: Python

Python Modules

In Python, Modules are simply files with the .py extension containing Python code that can be imported inside another Python Program.

Python Datetime

In Python, there is a module called datetime is used to manipulate dates and times. A date in Python is not a data type of its own.

Python Math Module

Python has a built-in module that you can use for mathematical tasks. Python has a built-in module that you can use for mathematical tasks.

Python JSON

Python has a built-in package called json, which can be used to work with JSON for storing and exchanging data.

Python RegEx

A RegEx or Regular Expression is a sequence of characters that forms a search pattern.

Python PIP

PIP is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes.

Python Try Except

The try block is used to test a block of code for errors and except block is used to handle the error.

Python File Handling

Python has several functions for file handling. The key function for working with files in Python is the open() function.

Python Write / Create File

To write to a text file in Python, First, open the text file using the open() function. Second, write to the text file using the write() method.

Python Delete File

In Python, the os.remove() function is used to to delete a file. First you should import the OS module before using function.

Matplotlib Pyplot

In Python, matplotlib.pyplot is a collection of functions that make matplotlib work like MATLAB.

Matplotlib Line

You can use the keyword argument linestyle, or shorter ls, to change the style of the plotted line.

Matplotlib Subplots

The subplots() function in pyplot module of matplotlib library is used to create a figure and a set of subplots.

Matplotlib Histograms

A histogram is an accurate representation of the distribution of numerical data. We can modify a histogram using matplotlib.pyplot.hist().