How to Concatenate Strings in Python

String concatenation is a common task in most applications. In this article, we will look into different ways to concatenate strings in Python. 1.Using the + operator To concatenate strings we can use the + operator. Output Here string str1 and str2 are joined using the + operator. We can add space between str1 and … Read more

Maximum value of integers in Python

In this article, we discuss the maximum value of integers in python. We will consider python 2 and python 3 versions. Python 2 In python 2, integers are internally handled using int and long data types. If the number value is beyond int’s maximum value of int it automatically switches to a long data type. … Read more

Python Split String into List

In this tutorial, we will discuss the methods to split a string into a list. Python string has split() method it can be used to split the string into a list. Syntax Parameters seperator – seperator used to split the string, it can be a character or multiple characters (optional) maxsplit – Number of splits … Read more

randrange in python | randrange vs randint

In this tutorial, we will discuss the randrange function in python. The randrange() function Python random module contains all the random number generation functions. Thus, to use randrange function we should import random module. The randrange function returns an element from a range of numbers. Syntax Parameters start – An integer specifying at which position … Read more

What is len in python?

What is len in python

The len is a built-in function in python. The len function returns the length (the number of items) of an object. The syntax of len() function One argument is required for the length function. The argument may be a sequence or collection sequence – list, string, bytes, tuple, range collection – dictionary, set Raises error … Read more

Length of the list in python

length of list in python feature image

Python list is a useful data structure used to store more than one element. In this article, we will discuss various ways to find the length of a list in python. We will discuss the following methods in detail and we will find out the faster method too. Calculate the list length using the loop … Read more