python Articles

Get all python tutorials here

Check for prime number using for and while loop in Python

Check for prime number using for and while loop in Python

Write python programs to find prime numbers using for loop and while loop and also within a given range between 1 to 100.

Read More
Merge two dictionaries together using python (3 ways)

Merge two dictionaries together using python (3 ways)

Find out 3 different ways to merge or combime two or more dictionaries in python.

Read More
Merge multiple JSON objects into one single object in Python

Merge multiple JSON objects into one single object in Python

Combine multiple JSON objects from a file into a single object and then save it in a file in python.

Read More
Python - Check if list is empty or not

Python - Check if list is empty or not

Learn about different methods to check if a list is empty or not in python.

Read More
Python-Check if user input is a number

Python-Check if user input is a number

Find out if the user input is a number or string using isnumeric and isdigit methods in Python program.

Read More
Check if user input is empty in python

Check if user input is empty in python

Find out how to check if the user input is empty in python using if and while statement and not operator.

Read More
How to take input as int (integer) in python?

How to take input as int (integer) in python?

Find out how to take integer input in python using int() function with exception handling for errors.

Read More
Remove the Last N element from a List in Python

Remove the Last N element from a List in Python

Find out how to remove the last N element from a Python list using pop(), list slicing and del function.

Read More
Remove Duplicates from List in Python

Remove Duplicates from List in Python

Find out how to remove duplicate items from a list in python using different method and create a unique list.

Read More
Python - Check if a string is Empty or Not

Python - Check if a string is Empty or Not

To find if a string is empty of not in python, we can use len(), not operator ,and strip() or isspace() method to check for non-zero length string.

Read More
Get the Index or Position of Item in List in Python

Get the Index or Position of Item in List in Python

In this post, we will discuss how to find the index of an element from a List in python with some examples.

Read More
Replace character in String by index in Python

Replace character in String by index in Python

Short article on how to replace a character in a string using the index with the help of python code.

Read More
How to replace characters in a string in Python

How to replace characters in a string in Python

Find out how to find and replace characters in a string in Python using Python.replace() method.

Read More
Split string by whitespace in python

Split string by whitespace in python

Find out how to split a string by whitespace using split() method in python. The split method split a string and returns a list.

Read More
How to split a list into multiple list using python

How to split a list into multiple list using python

To split a list we have to find the len of the list and then divide it by 2 to find the middle index. It helps to split list by chunks size.

Read More
Split String and get the first element using python

Split String and get the first element using python

Find out how to split a string and get the first element from the list using maxsplit argument in python.

Read More
Get the current year, month and day in Python

Get the current year, month and day in Python

Find out how to get the current year, month, and day in python. To get the current day or year we use the date class from the datetime module.

Read More
Convert a string into integer or float using Python

Convert a string into integer or float using Python

Find out how to convert a string into an integer or floating point number using int() and float() function in Python.

Read More