Available tutorials in python

How to print hello world in Python

This simple example help you to print in python. You can also print…

How to lowercase the string in Python

In this tutorial, we are going to learn how to lowercase the given…

How to get a filename without a extension in Python

We can get a filename without an extension by using the method in…

How to convert a String to Bytes in Python

To convert a string to bytes we can use the function in python. Here…

How to concatenate a list of strings in Python

In python, we can use the method to concatenate a list of strings…

How to trim whitespaces of a string in Python

We can remove the leading and trailing whitespaces of a string by…

How to split multiline string to multiple lines in Python

In this tutorial, we are going to learn about how to split the…

How to print literal curly-brace characters in python string and use .format

You need to wrap it with double curly braces to print the literal…

How to clear a list in Python

In this tutorial, we are going to learn about how to clear or empty a…

Python - unsupported operand type(s) for +:'int' and 'str'

In this tutorial, we are going to learn about how to solve the…

Capitalize the first letter of each word in a String in Python

In this tutorial, we are going to learn about how to capitalize or…

How to convert a list of strings to Integers in Python

To convert a list of strings into integers, we can use the function…

How to convert the float to Int in Python

In this tutorial, we will learn about how to convert the float to an…

How to check if a number is multiple of 10 in Python

In this tutorial, we are going to learn about how to check if a given…

Checking if a number is divisible by another number in Python

In this tutorial, we are going to learn about how to check if a number…

How to check if multiple variables are not None in Python

In this tutorial, we are going to learn about how to check if a…

How to check if a string is a number in Python

In this tutorial, we are going to learn about how to check if a given…

How to get last 4 characters of a string in Python

In this tutorial, we are going to learn about how to get the last…

Check if a variable is divisible by 2 in JavaScript

In this tutorial, we are going to learn about how to check if a given…

Check if multiple variables have same value in Python

In this tutorial, we are going to learn about how to check if a…

Checking if variable is a integer in Python

In this tutorial, we are going to learn about how to check if the…

Fixed - dict object is not callable error in Python

In this tutorial, we are going to learn how to fix the TypeError…

How to check if a string starts with a number in Python

In this tutorial, we are going to learn about how to check if a string…

Initialize an empty list with certain size in Python

In this tutorial, we are going to learn about how to intialize or…

Python - can only concatenate str (not float) to str

In this tutorial, we are going to learn about how to solve the…

How to solve list object is not callable error in Python

In this tutorial, we will learn how to solve the TypeError: ‘list…

Python - Can only concatenate str (not int) to str

In this tutorial, we are going to learn about how to solve the…

Python - ImportError: No module named six

In this tutorial we are going to learn about, how to fix the…

How to reverse a tuple in Python (2 Easy ways)

In this tutorial, we are going to learn about, how to reverse the…

Get last 2 digits of a number in Python

In this tutorial, we are going to learn about how to get the last…

Get the first 2 characters of a string in Python

In this tutorial, we are going to learn about how to get the first…

How to get length of a string in Python

In this tutorial, we will learn how to get the length of a string in…

Removing the first n characters of a string in Python

In this tutorial, we are going to learn about how to remove the first…

Converting string to dictionary in Python

To convert a string to dictionary, we can use the built-in method in…

How to run multiple commands in Python

This example will show you, how to run a multiple bash commands with…

How to get last n elements of a list in Python

In this tutorial, we are going to learn about how to get the last n…

How to get the first character from a string in Python

To get the first character from a string, we can use the slice…

How to convert bytes to a string in Python

To convert bytes to a string you need to use the method by passing…

How to repeat a string n times in Python

In this tutorial, we are going to learn about how to repeat a string n…

Calling an external command from Python

This example will show you how to call an external command from Unix…

Concatenating the two lists in Python

In this tutorial, we are going to learn how to concatenate the two…

How to read a file line by line into a list in Python

Here is an example that reads a file line by line and stores it into…

How to get the index of a character in Python String

To get the index of a character in a python string, we can use the…

Convert integer to a string in Python

In this tutorial, we are going to learn about how to convert the…

Removing empty strings from a Python list

To remove the empty strings from a list, we can use the built-in…

How to get a current year in Python

In this tutorial, we are going to learn about how to get the current…

How to convert a string to boolean in Python

In this tutorial, we are going to learn about how to convert the…

How to check if a string ends with another in Python

In this tutorial, we are going to learn about how to check if a string…

How to sort a list of numbers in Python

In this tutorial, we are going to learn about how to sort the list of…

How to initialize an empty list in Python

In this tutorial, we are going to learn about how to intialize or…

How to get a substring of string in Python

To get a substring of a string, we can use the slice syntax in python…

How to join the list of elements to string in Python

In this tutorial, we are going to learn about how to join the list of…

How to Convert the char to a int in Python

In this tutorial, we are going to learn about how to convert the char…

How to Convert Character to a ASCII Value in Python

In this tutorial, we are going to learn about how to convert the…

Remove the first element from a list in Python

In this tutorial, we are going to learn about how to remove the first…

How to Convert the integer to character in Python

In this tutorial, we are going to learn about how to convert the…

How to check if a Python string is Empty

In this tutorial we are going to learn about, how to check if a string…

How to remove the leading and trailing spaces in Python

To remove the leading and trailing white spaces from a string, we can…

Removing the leading whitespace from a string in Python

Learn, how to remove the leading whitespace of a string beginning in…

How to convert a boolean into string in Python

In this tutorial, we are going to learn about how to convert the…

How to get the previous month name in Python

In this tutorial, we are going to learn about how to get the previous…

How to get a previous year in Python

In this tutorial, we are going to learn about how to get the previous…

How to get first n elements of a list in Python

In this tutorial, we are going to learn about how to get the first n…

How to remove decimal part from a number in Python

In this tutorial, we are going to learn about how to remove the…

How to concatenate two strings in Python

In this tutorial, we are going to learn how to concatenate the two…

Remove the last element from a list in Python

In this tutorial, we are going to learn about how to remove the last…

Solve - (unicode error) codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape

In this tutorial, we are going to learn about how to solve the…

How to add a elements at the end of a list in Python

In this tutorial, we are going to learn about two different ways to…

Getting the length of a list in Python

In this tutorial, we are going to learn about how to get the length of…

How to get the last character of a string in Python

To get the last character of a string, we can use the slice notation…

How to get the position of a character inside a string in Python

In this tutorial, we are going to learn about how to get the position…

How to uppercase the string in Python

In this tutorial, we are going to learn how to uppercase the given…

Getting the first element of a List in Python

In this tutorial, we are going to learn about how to get the first…

How to remove the character of a string in Python

In this tutorial, we are going to learn about how to remove the…

How to reverse a string in Python

Learn, how to reverse a string in Python. To reverse a string in…

Python - How to comment a block of code

In this tutorial, we are going to learn about how to comment a block…

How to convert all strings in a list to ints in Python

In this tutorial, we are going to learn about how to convert all…

Removing the last n characters of a string in Python

In this tutorial, we are going to learn about how to remove the last n…

How to extract a substring in a String Python

To extract a substring in python we can use the slicing syntax by…

How to reverse a list in Python

In this tutorial, we will learn about how to reverse a list in Python…

How to declare variable without any value in Python

In this tutorial, we are going to learn about how to declare a…

How to Convert ASCII value to a Character in Python

In this tutorial, we are going to learn about how to convert the ASCII…

How to get first n characters of a string in Python

In this tutorial, we are going to learn about how to get the first n…

How to uppercase the first letter of a string in Python

In this tutorial, we are going to learn about how to uppercase the…

How to check if a tuple is Empty in Python

In this tutorial we are going to learn about, how to check if a tuple…

How to check if the NumPy array is Empty in Python

In this tutorial, we are going to learn about how to check if the…

How to check if a list is empty using Python

In this tutorial, we are going to learn about how to check if a list…

How to check if a NumPy array has all zeros in Python

In this tutorial, we are going to learn about how to check if a NumPy…

How to append a string with other in Python

In this tutorial, we are going to learn about two different ways to…

How to convert list to comma-separated string in Python

In this tutorial, we are going to learn about how to convert the list…

How to add elements at the beginning of a list in Python

In this tutorial, we are going to learn about two different ways to…

How to Convert the Object into String in Python

In this tutorial, we are going to learn about how to convert the…

How to Change any datatype to a String in Python

In this tutorial, we are going to learn about how to convert the…

How to get function name as a string in Python

In this tutorial, we are going to learn about how to get the function…

How to check whether a variable exists in Python

Learn, how to check whether a variable exists or not in Python…

Get last 3 digits of a number in Python

In this tutorial, we are going to learn about how to get the last…

How to Sort an List by String Length in Python

In this tutorial, we will learn about how to sort an list of strings…

How to determine the length of a set in Python

In this tutorial, we are going to learn about how to get the length of…

How to check if a string starts with another in Python

In this tutorial, we are going to learn about how to check if a string…

Removing the whitespace at the end of a string in Python

Learn, how to remove the (trailing) whitespace at the end of a string…

How to write a string to a text file in Python

To write a string to text file, we can use the method in python. Here…

How to remove duplicate values from a Python List

To remove the duplicate values from a python list first, we need to…

How to get last n characters of a string in Python

In this tutorial, we are going to learn about how to get the last n…

How to get the OS name in Python

In this tutorial, we will learn how to get the current OS (operating…

How to get last element of a list in Python

In this tutorial, we are going to learn about how to get the last…

How to remove multiple spaces from a string in Python

We can remove multiple spaces from a string with a single space by…

How to create Multiline comments in Python

In this tutorial, we are going to learn about how to create a…

How to remove the first character of a string in Python

In this tutorial, we are going to learn about how to remove the first…

Removing the first and last character from a string in Python

Learn, how to remove the first and last character from a given string…

How to print a Map object in Python

If you try to print a map object in python, you’ll see the following…

Convert the string to Double in Python

In this tutorial, we are going to learn about how to convert the…

How to convert datetime.timedelta to string in Python

This following example shows you, how to convert a datetime.timedelta…

How to initialize an empty string in Python

In this tutorial, we are going to learn about how to intialize or…

How to append multiple values to a list in Python

In this tutorial, we are going to learn about how to add a multiple…

Get the nth character of a string in Python

In this tutorial, we will learn how to get the nth character of a…

Check the last digit of a number in Python

In this tutorial, we are going to learn about how to check the last…

Concatenate two strings with space in Python

In this tutorial, we are going to learn how to concatenate the two…

Fix the 'int' object is not callable error in Python

In this tutorial, we are going to learn about how to fix the TypeError…

Python - How to solve 'int' object is not iterable

In this tutorial, we are going to learn about how to solve the…

Solve - float object is not callable error in Python

In this tutorial, we are going to learn about how to solve the…

Python - ModuleNotFoundError: No module named 'six' [Solved]

In this tutorial we are going to learn about, how to fix the…

How to convert a string to an integer in Python

In this tutorial, we are going to learn how to convert the string to…

Python - Get the first digit of a number

In this tutorial, we are going to learn about how to get the first…

How to remove the last character of a string in Python

In this tutorial, we are going to learn about how to remove the last…

How to make copy of a string in Python

In this tutorial, we are going to learn about multiple ways to copy a…

Convert the String to a Float in Python

In this tutorial, we are going to learn about how to convert the…

Fix the 'str' object is not callable error in Python

In this tutorial, we are going to learn how to fix the TypeError: ‘str…

Counting number of occurrences of a character in a Python String

In this tutorial, we will learn how to count the number of occurrences…

Get the first two digits of a number in Python

In this tutorial, we are going to learn about how to get the first two…

Python - Get the last digit of a number

In this tutorial, we are going to learn about how to get the last…

How to create a multi-line string in Python

In this tutorial, we are going to learn about how to create a multi…

How to check if a variable is None in Python

In this tutorial, we are going to learn about how to check if a…

How to check if a variable is tuple in Python

In this tutorial, we are going to learn about how to check if a…

How to check if a variable is list in Python

In this tutorial, we are going to learn about how to check if a…

How to iterate through a String in Python

To iterate over a each character in a string we can use loop in…

Check if a variable is a string or not in Python

In this tutorial, we are going to learn about how to check if a…

How to add leading zeros to a Python String

Learn, how to add leading zeros in a string in Python with the help of…