Skip to content

Category: Python

Convert wav to mp3 format in Python

Learn how to convert an audio file from wav format to mp3 format in Python. Pydub is a Python module that can be used in Audio manipulation. pydub can be […]

Check if variable exists in Python

How to check if a variable exists in Python ? Python doesn’t have a specific function to test whether a variable is defined, since all variables are expected to have been defined before use, even if initially assigned the None object. The […]

Sending email in Python

How to send email in Python? There are many ways to acheive this: smptlib, sendmail or even Gmail SMTP port can be used. Read on to know how. smtplib The smtplib is […]

Install Python 3.8 on Ubuntu

Python 3.8.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. This tutorial helps you install Python 3.8 on Ubuntu. Major […]

How to print in same line in Python?

One annoying thing about print() function is, it automatically prints a newline ‘\n’ at the end of the line! print() function was added in Python 3. Until Python 2, print() […]

How to get hostname in Python?

There are a few different ways to get the hostname of a system in Python. The socket module in Python gives access to the BSD socket interface. It is accessible […]

How to generate random numbers in Python?

Randomness plays an important role in the evolution of machine learning algorithms. Python defines a set of functions that are used to generate or manipulate random numbers. This particular type […]