Category "list"

How can I sort a list of strings in ascending order of numeric part

I have a list of paths which have multiple numerical parts within them, here is part of it: 'C:\\Python\\Python310\\Scripts\\mockup_test\\17mm.JPG', 'C:\\Python

Qt - Add item from a second window to ListWidget in MainWindow

I have a QDialog where I can enter a Text and add it to a ListWidget inside the MainWindow after I clicked OK. Therefore I created a Method in the MainWindow cl

<E> and <Object> differences and usage

Can someone explain me what are the differences by using E or Object for example in a class for Lists, and their singular usage and definition. I have to use th

Kotlin: Problem with List Filter by Multiple Conditions

I'm trying to match two lists to another. In one list are items of crypto trades, the other contains so called candlesticks, which represents a price of crypto

python iterate through a list and skip n iterations within the loop every time a condition is met

the following code iterates through a list and counts every time the condition <10 is met. What I want to do is that once this condition is met, the next poi

Is there a more efficient way to find index of an element without using list built-in functions?

We can get the index of an element in a list using the .index() function. I was wondering if there's any more efficient way to find the index without using the

find unique lists inside another list in an efficient way

solution = [[1,0,0],[0,1,0], [1,0,0], [1,0,0]] I have the above nested list, which contain some other lists inside it, how do we need to get the unique lists i

c# - clone array of list of objects not working [duplicate]

I'm trying to clone array of list of objects. the clone modified when the original list modified (one of the properties of Page object). how d

How to have dynamic columns (like for weeks w1, w2, w3...) to contain number value as score in Sharepoint list

See attached spreadsheet screenshot. How to incorporate dynamic / ever increasing columns with custom labels such as W1, W2, W3 to contain number value (score 0

How do i get the values of object in arrays react js

Object { rows: (1) […], count: 3 } ​ My api is giving me this count: 3 ​rows: Array [ {…} ] ​​0: Object { ELIGIBILITATE: "

How do I clone a list so that it doesn't change unexpectedly after assignment?

While using new_list = my_list, any modifications to new_list changes my_list every time. Why is this, and how can I clone or copy the list to prevent it?

Removing a list in a list of lists if a condition not satisfied

I have a list of lists. I want to remove lists if the lenght of intersection of values in the list with previous lists is more than one. For example A=[(1,2,3,4

Python - Extract value from list of dictionaries that match a specified key

I have a list of names: names = ['london','paris'] and I have a list of dictionaries: data = [ { "_id": "ebef3cb1-9053-4d1e-b409-b682236445b7",

List in Python help needed: how to Avoid calling repetitive code

I have a function shown below: def _extract_parent(matched_list, json_data, info_type): return [json_data[match_lst][info_type] for match_lst in matched_lis

Write a function that takes in a list of integers and returns True if it contains 007 in order but they don't have to be consecutive

examples : 1.spy_game([1,2,4,0,0,7,5]) --> True 2.spy_game([1,0,2,4,0,5,7]) --> True 3.spy_game([1,7,2,0,4,5,0]) --> False

Spark-Java : How to add an array column in spark Dataframe

I am trying to add a new column to my Spark Dataframe. New column added will be of a size based on a variable (say salt) post which I will use that column to ex

Iterating through list of lists of lists

I am trying to iterate through a 3-D list in python(not numpy but I am willing to convert to a numpy array if this makes it easier) in such a way that from a li

How to change array rows places whithouth numpy

Hello everyone here is my code: n =[[34,2,55,24,22],[31,22,4,7,333],[87,74,44,12,48]] for r in n: for c in r: print(c,end = " ") print() sums=[]

Is there a way to initialize or modify a list that allows to reference previous values?

I want to store non-rectangular data in a structure, e.g. in a list. Referencing previous data works using a tibble, e.g. like this: dat <- tibble(a = 2,

a python console application executed from within vscode integrated terminal not allowing arrow keys to select list items

I have a file samlapi.py. Running the file pops up a dialog with a list of menu items on the terminal to select from. I cannot traverse the menu items using key