How to Sort an Array in Python?

Sort an Array in Python using sort()

A few weeks ago, I was working on a Python project where I had a requirement to remove duplicate elements from an array. The sorting technique helped me to do that. So, in this article, I will explain all the ways to sort an array in Python with some real examples. Sort an Array in … Read more >>

Difference Between = and == in Python

Difference Between = and == in Python

In this tutorial, I will explain the key differences between the = and == operators in Python. As a Python developer working on projects, you should know where to use these operators. The Assignment Operator (=) The = operator in Python is known as the assignment operator. It is used to assign a value to … Read more >>

Difference Between Linear Search and Binary Search in Python

difference between linear search and binary search

In this tutorial, I will explain the key differences between linear search and binary search algorithms in Python. As a software engineer working on various projects, I’ve encountered situations where choosing the right search algorithm can significantly impact the performance and efficiency of my code. In this article, I will explain everything about linear search … Read more >>

Python Set vs Tuple

Python Set vs Tuple

Python provides several built-in data structures to store collections of elements, including lists, tuples, and sets. While lists are commonly used, tuples and sets have specific use cases. Tuples are ordered collections of immutable elements, while sets are unordered collections of unique elements. I will explain the differences between Python sets and tuples in this tutorial with some … Read more >>

How to Get the Current Date and Time in Python?

how to get current date and time in python

As a Python developer, you will get to work on dates and times in many projects. So, I thought to write a complete tutorial on how to get the current date and time in Python using the built-in datetime module. Import the Python datetime Module To get started, we need to import the datetime module … Read more >>

How to Unpack a Tuple in Python?

Unpack a Tuple in Python

In this tutorial, I will explain how to unpack a tuple in Python. Unpacking a tuple is a feature that allows you to assign the values of a tuple to individual variables. It can be incredibly useful when working with functions that return multiple values or when you need to extract specific elements from a … Read more >>

How to Convert an Array to a Tuple in Python?

Python Convert an Array to a Tuple

As a data scientist working with large datasets in the USA, I often need to transform data structures for efficient processing and analysis. One common task is converting a NumPy array to a tuple or a list of tuples. In this tutorial, I will explain how to convert an array to a tuple in Python … Read more >>

How to Use the raw_input Function in Python for User Input?

The raw_input function is used to prompt users for text input and store that input as a string variable in your Python programs. In this tutorial, I will explain how to use the raw_input function in Python to get user input from the command line. What is the raw_input Function in Python? The raw_input function … Read more >>

How to Iterate Through Tuples in Python?

Iterate Through Tuples in Python

Recently, in a paid webinar, someone asked about how to loop through a tuple in Python. So, I decided to write a complete tutorial on various methods to iterate over tuples, including using for loops, while loops, and built-in functions. In this tutorial, I will explain how to iterate through tuples in Python with various … Read more >>

How to Append Elements to a Tuple in Python?

Python Append Elements to a Tuple

Tuples are immutable sequences in Python, which means that once created, their elements cannot be changed. However, there are ways to add new elements to an existing tuple by creating a new tuple that combines the original tuple with the new elements. In this tutorial, I will explain how to append elements to a tuple … 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.