Category "list"

in python how can i add a list of numbers

im new to python and know nothing does anyone know how to

Store functions in list and call them later

I want to store functions in a list and then later in a program call those functions from that list. This works for me, however, I don't know if it is correct

in python how can i add a list of numbers

im new to python and know nothing does anyone know how to

How can I save the original index after sorting a list?

Let's say I have the following array: a = [4,2,3,1,4] Then I sort it: b = sorted(A) = [1,2,3,4,4] How could I have a list that map where each number was,

Unrecognized token error while converting JSON String to Java Object List

here is the JSON string which I want to convert as java object List. String manuallyVerificationRemarks = "[{ "logedInUserName": "forum-admin", "action

3-Dimension List or Map

I need something like a 3-dimension (like a list or a map), which I fill with 2 Strings and an Integer within a loop. But, unfortunately I don't know which data

Get file size, creation date and modification date in Python

I need to get file info (path, size, dates, etc) and save it in a txt but I don't know where or how to do it. This is what I have: ruta = "FolderPath" os.list

Is it possible to define function that creates an N-dimensional list of lists easily?

I have searched and found these questions: How to create a multi-dimensional list and N dimensional array in python which hint toward what I am looking for, but

Need random value from last x elements in a list

I'm trying to get a random number from a list within a specific range, without using any module. Input list looks like li = [12,44,55,64,34,54,56,43,56,9,87,89]

Allow Select all that Apply in Excel in Multiple Columns on the same sheet

I am creating an activity tracker in Excel. I'd like to be able to "Select all that apply" from drop down lists in two separate columns on the same sheet. I am

Need to make a list by splitting the given string in python

Input string has 'n' times of X. Like this "XXXXX" Need to split the string and make out a list in which each character of the string(X) is each element of list

How to sort a List<Object> alphabetically using Object name field

I have a List of Objects like List<Object> p.I want to sort this list alphabetically using Object name field. Object contains 10 field and name field is o

How can I get subList of a List in Apex Salesforce?

I have got a list of SObjects having N number of items/sObjects SObject[] sList = [sobject1, sboject2, sboject3, ........ , sobjectN] How can I get just 10 it

Find numbers in Python list which are within a certain distance of each other

I have a list of numbers in Python. It looks like this: a = [87, 84, 86, 89, 90, 2014, 1000, 1002, 997, 999] I want to keep all the numbers which are within

Android app - delete item from list following an action in another activity

I'm creating an app where I display a list of pending challenges. When the user clicks on a challenge, he can accept it or ignore it. Here's what I want to do

Fastest way to search Nested List<> in C#

I have a List<> which contains another List<> I need to find if a given value is present in any of the items in the innermost list. If match found,

convert csv file to list of dictionaries

I have a csv file col1, col2, col3 1, 2, 3 4, 5, 6 I want to create a list of dictionary from this csv. output as : a= [{'col1':1, 'col2':2, 'col3':3}, {'

Extract subarray between certain value in Python

I have a list of values that are the result of merging many files. I need to pad some of the values. I know that each sub-section begins with the value -1. I am

Assigning empty list

I don't really know how I stumbled upon this, and I don't know what to think about it, but apparently [] = [] is a legal operation in python, so is [] = '', but

How do I initialize a two-dimensional List statically?

How can I initialize a multidimensional List statically? This works: List<List<Integer>> list = new ArrayList<List<Integer>>(); But