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 remove elements from a generic list while iterating over it?

I am looking for a better pattern for working with a list of elements which each need processed and then …

c# list loops generics key-value
Merge two (or more) lists into one, in C# .NET

Is it possible to convert two or more lists into one single list, in .NET using C#? For example, public …

c# .net list
Converting from IEnumerable to List

I want to convert from IEnumerable<Contact> to List<Contact>. How can I do this?

c# list ienumerable
Sort a list of tuples by 2nd item (integer value)

I have a list of tuples that looks something like this: [('abc', 121),('abc', 231),('abc', 148), ('abc',221)] I want to sort this …

python list tuples
How to get last items of a list in Python?

I need the last 9 numbers of a list and I'm sure there is a way to do it with slicing, …

python list slice
Python list subtraction operation

I want to do something similar to this: >>> x = [1,2,3,4,5,6,7,8,9,0] >>> x [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] >>> y = [1,3,5,7,9] &…

python list
Select method in List<t> Collection

I have an asp.net application, and now I am using datasets for data manipulation. I recently started to convert …

c# asp.net list dataset
Join a list of items with different types as string in Python

I need to join a list of items. Many of the items in the list are integer values returned from …

python string list
ArrayList vs List<> in C#

What is the difference between ArrayList and List<> in C#? Is it only that List<> has …

c# .net list generics arraylist
List vs tuple, when to use each?

In Python, when should you use lists and when tuples? Sometimes you don't have a choice, for example if you …

python list types tuples