## Python | Get indices of True values in a binary list

Boolean lists are often used by the developers to check for True values during hashing. Boolean list is also used in certain dynamic programming paradigms… Read More »

## Python | Binary element list grouping

Sometimes while working with the databases, we need to perform certain list operations that are more like query language, for instance, grouping of nested list… Read More »

## Python | Count of elements matching particular condition

Checking a number/element by a condition is a common problem one faces and is done in almost every program. Sometimes we also require to get… Read More »

## Python | Get the Index of first element greater than K

Python list operations are always desired to have shorthands as they are used in many places in development. Hence having knowledge of them always remains… Read More »

## Python | Last occurrence of some element in a list

There are many ways to find out the first index of element in the list as Python in its language provides index() function that returns… Read More »

## Python | Check if list is strictly increasing

The test for monotonic sequence is a utility that has manifold applications in mathematics and hence every sphere related to mathematics. As mathematics and Computer… Read More »

## Python | Initializing multiple lists

In real applications, we often have to work with multiple lists and to initialize them with empty lists hampers the readability of code. Hence a… Read More »

## Python | Remove first K elements matching some condition

Removal of elements in list can be performed using many inbuilt functions. Removing all or just a single occurrence removal both functions are present in… Read More »

## Python | Add similar value multiple times in list

Adding a single value in list is quite generic and easy. But to add that value more than one time, generally, a loop is used… Read More »

## Python | Get first element with maximum value in list of tuples

In Python, we can bind structural information in form of tuples and then can retrieve the same. But sometimes we require the information of tuple… Read More »

## Python | Interleave multiple lists of same length

Given lists of same length, write a Python program to store alternative elements of given lists in a new list. Let’s discuss certain ways in… Read More »

## Python | Merge two lists into list of tuples

Given two lists, write a Python program to merge the two lists into list of tuples. Examples: Input : list1 = [1, 2, 3] list2… Read More »

## Python | Combining two sorted lists

Many a times we encounter a problem where we wish to use the merge function of merge sort and is a classical problem that occurs… Read More »

## Python | List consisting of all the alternate elements

Some of the list operations are quite general and having shorthands without needing to formulate a multiline code is always required. Wanting to construct the… Read More »

## Python | Finding strings with given substring in list

The classical problem that can be handled quite easily by Python and has been also dealt with many times is finding if a string is… Read More »