Skip to content

Tag Archives: python-list

Given a list, print all the values in a list that are greater than the given value   Examples: Input : list = [10, 20, 30,… Read More
Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to x.  Examples: Input… Read More
Given a list, print all the unique numbers in any order. Examples:  Input : 10 20 10 30 40 40 Output : 10 20 30… Read More
Given lists in a list, find the maximum sum of elements of list in a list of lists. Examples: Input : [[1, 2, 3], [4,… Read More
Given two lists, check if they are circularly identical or not. Examples: Input : list1 = [10, 10, 0, 0, 10] list2 = [10, 10,… Read More
We are given an array, find prefix sums of given array. Examples: Input : arr = [1, 2, 3] Output : sum = [1, 3,… Read More
Given two arrays, find their intersection. Examples: Input: arr1[] = [1, 3, 4, 5, 7] arr2[] = [2, 3, 5, 6] Output: Intersection : [3,… Read More
Given two lists a, b. Check if two lists have at least one element common in them. Examples: Input : a = [1, 2, 3,… Read More
Given an array arr[] and a position in array, k. Write a function name reverse (a[], k) such that it reverses subarray arr[0..k-1]. Extra space… Read More
In this problem, we need to accept a list. The list can have nested tuples. We need to count the elements in a list until… Read More
In this program, we will try to convert a given string to a list, where spaces or any other special characters, according to the users… Read More
In this article, we will learn How to check if the given list is empty or not.  Example: Input: ['Geeks', 'Geeks', 'Geeks', 'Geeks', ] Output:… Read More
Given an array, cyclically rotate the array clockwise by one. Examples: Input: arr = [1, 2, 3, 4, 5] Output: arr = [5, 1, 2,… Read More
There are various ways in which the difference between two lists can be generated. In this article, we will see the different ways to Get… Read More
In this article, we will go through various ways of copy lists in Python. These various ways of copying list take different execution times, so… Read More

Start Your Coding Journey Now!