Skip to content

Tag Archives: python-list

The job is simple. We need to take a list, with duplicate elements in it and generate another list which only contains the element without… Read More
We need to take two lists in Python and merge them into one. Finally, we display the sorted list. Examples: Input : list1 = [25,… Read More
Given a string consisting of alphabets and other characters, remove all the characters other than alphabets and print the string so formed. Examples: Input :… Read More
Given an array of words, print all anagrams together ? Examples: Input : arr = ['cat', 'dog', 'tac', 'god', 'act'] Output : 'cat tac act… Read More
Given a string and a number k, find the k-th non-repeating character in the string. Consider a large input string with lacs of characters and… Read More
Given an array of random numbers, Push all the zeros of a given array to the end of the array. For example, if the given… Read More
Prerequisites : list and Deque in Python. Unlike C++ STL and Java Collections, Python does have specific classes/interfaces for Stack and Queue. Following are different… Read More
1) What is the output of the following program?  PYTHON L = list('123456') L[0] = L[5] = 0 L[3] = L[-2] print(L) a) [0, ‘2’,… Read More
Prerequisite: Lists and Tuples 1) What is the output of the following program?   PYTHON List = [True, 50, 10] List.insert(2, 5)    print(List, "Sum is: ",… Read More
Prerequisite: List and Tuples Note: Output of all these programs is tested on Python3 1) What is the output of the following program?  PYTHON L1 =… Read More
Pre-requisite: List in python 1) What is the output of the following program?  Python data = [2, 3, 9] temp = [[x for x in[data]]… Read More
Prerequisite – Lists in Python Predict the output of the following Python programs. These question set will make you conversant with List Concepts in Python… Read More
Python List Methodshas multiple methods to work with Python lists, Below we’ve explained all the methods you can use with Python lists, for example, append(),… Read More
Some of the list methods are mentioned in set 1 below List Methods in Python | Set 1 (in, not in, len(), min(), max()…) More… Read More
List methods are discussed in this article. 1. len() :- This function returns the length of list. List = [1, 2, 3, 1, 2, 1,… Read More

Start Your Coding Journey Now!