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.

Getting all file names from a folder using C#

I wanted to know if it is possible to get all the names of text files in a certain folder. …

c# list text-files directory
How to delete an item in a list if it exists?

I am getting new_tag from a form text field with self.response.get("new_tag") and selected_tags from …

python list
Python: Get the first character of the first string in a list?

How would I get the first character from the first string in a list in Python? It seems that I …

python string list character
IEnumerable vs List - What to Use? How do they work?

I have some doubts over how Enumerators work, and LINQ. Consider these two simple selects: List<Animal> sel = (…

c# linq list ienumerable
Finding median of list in Python

How do you find the median of a list in Python? The list can be of any size and the …

python list sorting median
How do I loop through a list by twos?

I want to loop through a Python list and process 2 list items at a time. Something like this in another …

python list loops for-loop iteration
How to empty a list?

It seems so "dirty" emptying a list in this way: while len(alist) > 0 : alist.pop() Does a clear way …

python list
How to find all occurrences of an element in a list

index() will give the first occurrence of an item in a list. Is there a neat trick which returns all …

python list
Java: convert List<String> to a String

JavaScript has Array.join() js>["Bill","Bob","Steve"].join(" and ") Bill and Bob and Steve Does Java have anything …

java list
Getting a map() to return a list in Python 3.x

I'm trying to map a list into hex, and then use the list elsewhere. In python 2.6, this was easy: A: …

python list python-3.x map-function