Python | Ways to iterate tuple list of lists

List is an important container and used almost in every code of day-day programming as well as web-development, more it is used, more is the… Read More »

Python | Adding K to each element in a list of integers

While working with the Python lists, we can come over a situation in which we require to add the integer k to each element in… Read More »

Python | Remove last K elements of list

We often come to the situations in which we need to decrease the size of the list by truncating the k last elements of the… Read More »

Python | Check if element is present in tuple of tuples

Sometimes the data that we use is in the form of tuples and often we need to look into the nested tuples as well. The… Read More »

Python | Element repetition in list

Sometimes we require to add a duplicate value in the list for several different utilities. This type of application is sometimes required in day-day programming.… Read More »

Python | Add the element in the list with help of indexing

One can easily add elements to the list using the append functions. But in competitive programming, we might need to memoize sometimes, hence we need… Read More »

Python | Insert list in another list

The problem of inserting a number at any index is a quite common one. But sometimes we require to insert the whole list into another… Read More »

Python | Convert number to list of integers

The interconversion of data types is a problem that is quite common in programming. Sometimes we need to convert a single number to list of… Read More »

Python | Convert list of strings and characters to list of characters

Sometimes we come forward to the problem in which we receive a list that consists of strings and characters mixed and the task we need… Read More »

Python | Group elements at same indices in a multi-list

Flattening a 2D list to one is a common problem that is faced in many domains. But sometimes we require to pair elements at specific… Read More »

Python | Pair iteration in list

List iteration is common in programming, but sometimes one requires to print the elements in consecutive pairs. This particular problem is quite common and having… Read More »

Python | Convert list of string to list of list

Many times, we come over the dumped data that is found in the string format and we require it to be represented into the actual… Read More »

Python | Printing list vertically

Printing the list has been dealt many times. But sometimes we need a different format to get the output of list. This also has application… Read More »

Python | Check if all elements in a list are identical

Given a list, write a Python program to check if all the elements in that list are identical. Examples: Input : [‘a’, ‘b’, ‘c’] Output… Read More »

Python | Sort list according to other list order

Sorting is an essential utility used in majority of programming, be it for competitive programming or development. Conventional sorting has been dealt earlier many times.… Read More »