Category "list"

How to check if a list partially matches one of the lists in a list of lists?

I would like to check if a list is a sublist if a bigger list of lists. It would be easy to check if it is just in the list of lists but a partial match is also

How to check if a list partially matches one of the lists in a list of lists?

I would like to check if a list is a sublist if a bigger list of lists. It would be easy to check if it is just in the list of lists but a partial match is also

finding and replacing elements in a multidimensional list (python)

Similar to this question: finding and replacing elements in a list (python) but with a multi-dimensional array. For example, I want to replace all the N's with

In Python, how to numerically sum nested lists of integers: [[1,0], [1,1], [1,0]] → [3,1]

I have an array in the form of a = [[1, 0], [1, 1], [0, 0], [0, 1], [1, 0]] and I need to sum all values of the same index in the nested lists so that the ab

Removing [' and '] from CSV

I have several GB of CSV files where values in one of the columns look like this: Which is a consequence of this: urls.append(re.findall(r'http\S+', hashtags_r

React native Wifi list

Is there a way to scan and all get Wifi list using react native for Android and iOS. I have seen a few libraries but mostly for android and even those doesnt wo

how do i sort data from a csv file numerically in python

I am writing a program that takes students scores from a csv file and needs to sort then highest to lowest score. the csv file looks like this: josh 12 john

how do i sort data from a csv file numerically in python

I am writing a program that takes students scores from a csv file and needs to sort then highest to lowest score. the csv file looks like this: josh 12 john

How to synchronize to curves on matplotlib?

I have two curves that have their maximum roughly at the same time, but I'd like to match them exactly. The first function, maxind, determines where the maximum

How do I get quarterly S&P500 constituents in Python from the detailed change data?

I want to use S&P500 company information to calculate an index. However, the companies in S&P500 changes frequently, I want to know the constituents for

Write optimized code which takes following two list of dictionaries as input and gives output as final_result [duplicate]

Inputs: list1 = [{'item_type':1,'value':55, 'title':'abc'},{'item_type':2,'value':43, 'title':'def'},{'item_type':3,'value':35, 'title':'ghi'}

List<String> as input of GET method

I have a REST service. The input type of the GET method is List<String>: @GET @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public L

TypeError: list indices must be integers, not float

I have a python 3.x program that is producing an error: def main(): names = ['Ava Fischer', 'Bob White', 'Chris Rich', 'Danielle Porter', 'Gor

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