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.

finding and replacing elements in a list

I have to search through a list and replace all occurrences of one element with another. So far my attempts …

python list replace
Shuffling a list of objects

I have a list of objects and I want to shuffle them. I thought I could use the random.shuffle …

python list random shuffle
How can I get list of values from dict?

How can I get a list of the values in a dict in Python? In Java, getting the values of …

python list dictionary
Convert two lists into a dictionary

Imagine that you have: keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam'] What is the simplest way to produce the following …

python list dictionary
How to print out all the elements of a List in Java?

I am trying to print out all the elements of a List, however it is printing the pointer of the …

java list
How do I join two lists in Java?

Conditions: do not modifiy the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 …

java list jdk1.5
Convert Set to List without creating new List

I am using this code to convert a Set to a List: Map<String, List<String>> …

java performance list set
Get difference between two lists

I have two lists in Python, like these: temp1 = ['One', 'Two', 'Three', 'Four'] temp2 = ['One', 'Two'] I need to create …

python performance list set set-difference
How to read a text file into a list or an array with Python

I am trying to read the lines of a text file into a list or array in python. I just …

python arrays list text
get list from pandas dataframe column

I have an excel document which looks like this.. cluster load_date budget actual fixed_price A 1/1/2014 1000 4000 Y A 2/1/2014 12000 10000 Y …

python list pandas