Skip to content

Tag Archives: python-list

Given an array arr[] of N positive integers. The task is to find the maximum for every adjacent pair in the array. Examples: Input: 1… Read More
List: A list is of an ordered collection data type that is mutable which means it can be easily modified and we can change its… Read More
Prerequisites: Comprehensions in Python Most of the competitive programmers who code in Python often face difficulty in executing the programs within the given time limit.… Read More
Prerequisite: Python List, Numpy ndarray Both lists and NumPy arrays are inter-convertible. Since NumPy is a fast (High-performance) Python library for performing mathematical operations so… Read More
List: Lists are just like dynamic sized arrays, declared in other languages (vector in C++ and ArrayList in Java). Lists need not be homogeneous always… Read More
List: A list in Python is a collection of items which can contain elements of multiple data types, which may be either numeric, character logical… Read More
The task is to perform the operation of removing all the occurrences of a given item/element present in a list. Examples : Input : 1… Read More
List comprehension is an elegant way to define and create a list in Python. We can create lists just like mathematical statements and in one… Read More
Using ‘+’ operator to add an element in the list in Python: The use of the ‘+’ operator causes Python to access each element of… Read More
Sometimes, while working with Python dictionaries, we can have a problem in which we need to construct the list out of the values of dictionary.… Read More
Given a list, the task is to sort the list according to the column using the lambda approach. Examples: Input : array = [[1, 3,… Read More
List in Python is mainly implementation of dynamic sized arrays (like ArrayList in Java or vector in C++). Capacity of a list means number of… Read More
Hashing is a data structure that is used to store a large amount of data, which can be accessed in O(1) time by operations such… Read More
NumPy is a Python fundamental package used for efficient manipulations and operations on High-level mathematical functions, Multi-dimensional arrays, Linear algebra, Fourier Transformations, Random Number Capabilities,… Read More
Given a String S, a character array ch[], a number N and a replacing character, the task is to replace every Nth occurrence of each… Read More

Start Your Coding Journey Now!