Category "list"

Custom Button in SwiftUI List

SwiftUI Custom Button in List I'm trying to create a custom button in a SwiftUI List. I want it to have a blue background with white text, and importantly, to

Find a individual word location in a list that isn't its own value

I am trying to find a specific word in a list. As simple as it sounds, me and the people I've talked to can't think of an answer. Below is an example of my issu

how to pull certain data from a list response from instagrapi

so I'm working on some code to pull the pictures of people who have liked a post on instagram. i'm using instagrapi for the api system, but when using api.media

how to convert the dictionary string to dictionary int?

A = {'1': '[1,2]', '2': '[3,4]', '3': '[5,6]', '4': '[7,8]', '5': '[9,10]' } B = {'1': '70', '2': '70', '3': '70', '4': '70', '5': '70' } How to convert this m

Python Count Letters in Word

I am looking to complete this code but cannot get it to execute the right way. The program connects two user-inputted names into one full name and then looks fo

Unable to assign the result returned by the Method that receives a generic List and returns a List<?>

I'm trying to filter a List of objects that implements an interface. And I'm trying to create a generic method for all the classes. Something like: interface So

IndexError: list index out of range in for loop

I write a code in python but I faced this error : if a1[i] == a1[i+1] == a1[i+2]: IndexError: list index out of range I write an if condition that if my list l

Convert this String to a List in Python

I'm new to Python and I try to convert following txt to two lists, splitting Country from Capital. Afghanistan | Kabul Albania | Tirana Algeria | Algiers ... I

Nested list to dataframe [using purrr + map]

I've looked at a lot of posts so I'm sorry if this is redundant, but was hoping to get some help flattening a nested list: test <- list() test <- c( li

How can I make a list that can be accesed by other classes?

I'm trying to make a project using the standard std::list. There is a list of names that have to be accessed by multiple classes. The list has to be inside a cl

Create new numpy array by duplicating each item in an array

I would like to create a new numpy array by repeating each item in another array by a given number of times (n). I am currently doing this with a for loop and .

List is printing datetime.datetime

I have a result list that contains something like [(datetime.datetime(2013, 1, 1, 0, 1, 14),), (datetime.datetime(2013, 1, 1, 1, 33, 50),)] How does one prin

How to Initialize the List with the same element in flutter dart?

I have a list in dart I want to initialize the list with n number of the same element. example:- initialize the integer list with element 5 4 times. L

how to create list of lists in c#

I am trying to create list of lists, where the large list represent paper contain collection of small list represent question, list of question consist of quest

Converting a dictionary of dictionaries to a List of dictionaries

I have a dictionary of dictionaries.Is there any possible way to convert it to a list of dictionaries? And if not, then how is the filter() method applied to fi

Combinations divided into rows with no repetition of elements

I'm working with lists in Python. I have a list of colleagues which is colleagues=['Jack', 'Jessica' 'John', 'Mark', 'Mary', 'Paul'] I want to calculate all po

How do I compare two letters or values in two different lists?

I am making a program that has two lists (in Python), and each list contains 5 different letters. How do I make it so that any index number I choose for both li

Pandas - Add a new column extracting value from arrays based on other column value

I am currently stuck trying to extract a value from a list/array depending on values of a dataframe. Imagine i have this array. This array i can manually create

Pandas - Add a new column extracting value from arrays based on other column value

I am currently stuck trying to extract a value from a list/array depending on values of a dataframe. Imagine i have this array. This array i can manually create

How to merge multiple Maps having the same keys but different values into a single Map

I have n maps of the kind: HashMap<String,Double> map1; HashMap<String,Double> map2; ... What could I do to merge all these maps into a single map?