# Tag Archives: Python list-programs (adsbygoogle = window.adsbygoogle || []).push({});

## Python | Filter even values from a list

Given a list of numbers, the task is to make a new list containing only even values. Examples: Input: list = [1, 2, 3, 4,… Read More »

## Python | Find maximum value in each sublist

Given list of lists in Python, write a Python program to find maximum value of list each sub-list. Examples: Input : [[10, 13, 454, 66,… Read More »

## Python | Make a list of intervals with sequential numbers

Given a list of sequential numbers, Write a Python program to convert the given list into list of intervals. Examples: Input : [2, 3, 4,… Read More »

## Python | Spilt a sentence into list of words

Given a Sentence, write a Python program to convert the given sentence into list of words. Examples: Input : [‘Hello World’] Output : [‘Hello’, ‘world’]… Read More »

## Python | Convert case of elements in a list of strings

Given a list of strings, write a Python program to convert all string from lowercase/uppercase to uppercase/lowercase. Input : [‘GeEk’, ‘FOR’, ‘gEEKS’] Output: [‘geeks’, ‘for’,… Read More »

## Python | Convert a list into tuple of lists

We are given a list, the task is to convert the list into tuple of lists. Input: [‘Geeks’, ‘For’, ‘geeks’] Output: ([‘Geeks’], [‘For’], [‘geeks’]) Input:… Read More »

## Python | Remove unordered duplicate elements from a list

Given a list, the task is to remove the duplicate elements. All the elements which are not in same order but made of same characters/numbers… Read More »

## Python | Average of each n-length consecutive segment in a list

Given a list, the task is to find the average of each n-length consecutive segment where each segment contains n elements. Example: Input : [1,… Read More »

## Python | Get a list as input from user

We often encounter a situation when we need to take number/string as input from user. In this article, we will see how to get as… Read More »

## Python | First occurrence of True number

Many times we require to find the first occurring non-zero number to begin the processing with. This has mostly use case in Machine Learning domain… Read More »

## Python | Find common elements in list of lists

The problem of finding the common elements in list of 2 lists is quite a common problem and can be dealt with ease and also… Read More »

## Python | Prefix Sum Subarray till False value

The prefix array is quite famous in the programming practice. This article would discuss a variation of this scheme. This deals with the cumulative list… Read More »

## Python | Merge elements of sublists

Given two lists containing sublists, the task is to merge elements of sublist of two lists in a single list. Examples: Input: list1 = [[1,… Read More »

## Python | Remove all duplicates and permutations in nested list

Given nested list, the task is to remove all duplicated and permutations in that nested list. Input: [[-11, 0, 11], [-11, 11, 0], [-11, 0,… Read More »

## Python | Remove all digits from a list of strings

Given a list of strings, write a Python program to remove all digits from the list of string. Examples: Input : [‘alice1’, ‘bob2’, ‘cara3’] Output… Read More »