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.

C# List<string> to string with delimiter

Is there a function in C# to quickly convert some collection to string and separate values with delimiter? For example: …

c# string list delimiter
How to get the first element of the List or Set?

I'd like to know if I can get the first element of a list or set. Which method to use?

java list collections set
Remove duplicates from a List<T> in C#

Anyone have a quick method for de-duplicating a generic List in C#?

c# list generics duplicates
How to convert a string with comma-delimited items to a list in Python?

How do you convert a string into a list? Say the string is like text = "a,b,c". After the …

python string list
Alphabet range in Python

Instead of making a list of alphabet characters like this: alpha = ['a', 'b', 'c', 'd'.........'z'] is there any way …

python string list alphabet
How to remove item from list in C#?

I have a list stored in resultlist as follows: var resultlist = results.ToList(); It looks something like this: ID FirstName …

c# list
Initializing a list to a known number of elements in Python

Right now I am using a list, and was expecting something like: verts = list (1000) Should I use array instead?

python arrays list
Find intersection of two nested lists?

I know how to get an intersection of two flat lists: b1 = [1,2,3,4,5,9,11,15] b2 = [4,5,6,7,8] b3 = [val for val in b1 if …

python list intersection
How can I add an item to a IEnumerable<T> collection?

My question as title above. For example, IEnumerable<T> items = new T[]{new T("msg")}; items.ToList().Add(…

c# list ienumerable
How to sort a list of objects based on an attribute of the objects?

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves. The …

python list sorting oop count