Reversing a list is a common requirement in any programming language. In this tutorial, we…
Category: How To
How to Check if String Contains Substring in Python
A substring is a sequence of characters in a given string. Python has several built-in…
Sort Dictionary by value in Python
Dictionary in Python is an unordered collection to store data values in key:value pairs. Since Dictionaries…
How to get hostname in Python?
There are several ways to get a hostname in Python. The most popular and convenient…
How to Get File Size in Python?
There are different ways to get file size in Python. We will be using the…
Python List length: How to Find Length of List in Python?
The list in Python is a collection datatype that is ordered and mutable. Lists allow…
How to check if a file exists in Python?
When you perform a file operation such as reading from a file or writing content…
How to Create a Directory in Python?
The os module is a built-in utility available in both Python 2 and 3 versions, and…
How to get file extension in Python?
In Python, we can extract the file extension using two approaches. Let’s take a look…
How to check if a string is null or empty in PowerShell?
It’s straightforward to check if the string is null or empty in C# and Java.…
Python – List Files in a Directory
There are several modules available in Python to list files in a directory or folder.…
How to Check and Print Python Version?
In this tutorial, you will learn how to print the version of the current Python…