Top "List" questions

The list tag may refer to: a linked list (an ordered set of nodes, each referencing its successor), or a form of dynamic array.

How to convert a Map to List in Java?

What is the best way to convert a Map<key,value> to a List<value>? Just …

java list collections map
Convert list to array in Java

How can I convert a List to an Array in Java? Check the code below: ArrayList<Tienda> tiendas; …

java arrays list arraylist
Python: finding an element in a list

What is a good way to find the index of an element in a list in Python? Note that the …

python list
How to initialize a list of strings (List<string>) with many string values

How is it possible to initialize (with a C# initializer) a list of strings? I have tried with the example …

c# string list
Converting Dictionary to List?

I'm trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} …

python list dictionary
In Python, how do I convert all of the items in a list to floats?

I have a script which reads a text file, pulls decimal numbers out of it as strings and places them …

python list casting
Replace values in list using Python

I have a list where I want to replace values with None where condition() returns True. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] For example, if condition …

python list performance replace
List comprehension vs. lambda + filter

I happened to find myself having a basic filtering need: I have a list and I have to filter it …

python list functional-programming filter lambda
Creating an empty list in Python

What is the best way to create a new empty list in Python? l = [] or l = list() I am asking …

python performance list coding-style timeit
Remove empty strings from a list of strings

I want to remove all empty strings from a list of strings in python. My idea looks like this: while …

python string list