Most voted "list" questions
A list is an abstract type of data that represents a sequence of values, in which the same value can occur more than once. The main ways to implement a list is through an array (array, vector or one-dimensional matrix) or a chained list.
Learn more…1,022 questions
Sort by count of
-
0
votes1
answer40
viewsHow do I initialize a list with x positions in Python?
I want to create in the list x empty positions before filling, as I do?
-
0
votes0
answers9
views -
0
votes5
answers714
viewsI want to turn a text into a list of dictionaries
I’m making a bot in python for twitter that posts news about Latin America, at the time of making the system that detects whether a news is new or not, I will save the news that has already been…
-
0
votes1
answer94
viewsDouble linked list in C
Hello, I can’t understand what’s wrong with the code below. It was to add an element at the end of the linked list, but nothing happens and everything compiles without errors. Can someone help me,…
-
0
votes1
answer424
viewsEXCEL - Query list and return values
I have a database with the following information: I need to represent this information in graphic, and the need arose to create a query to search the values according to the selected week and month.…
-
0
votes1
answer830
viewsError Mapping types. Mapping types: Icollection`1 -> List`1
I’m having a problem converting a List for ViewModel, using the ToListViewModel. Faturacontroller.Cs FaturaViewModel faturaViewModel = new FaturaViewModel(); faturaViewModel.mensagens = new…
-
0
votes1
answer49
viewsReturn of a single element from a list to a LINQ
I’m taking elements from a list and I can’t erase the elements, I have to return them all. I found a problem at the end of this query, where you have the comment //Erro…
-
0
votes1
answer103
viewsPopulate an html with list jquery
this data element of jquery has a list, how to fill in html success: function (data) { var tabela = $("#linha"); var rows = ""; $(data).each(function (i, item) { rows += "<div>" +…
-
0
votes1
answer33
viewsList code not compiling well
Hello. I’m trying to learn about pointers and lists and I made a code that contains a menu and the option to enter as many values as I want. I made the code in the most recent codeblocks using W10…
-
0
votes1
answer54
viewsHow to check and convert Ienumerable values from a database query?
I have one that returns a table in Ienumerable and I have a certain column that returns values "A" for Active, "C" for Canceled and so on. I would like to convert these values to the correct one…
-
0
votes3
answers81
viewsHow do I resolve this error by trying to delete a specific node from a chained double list?
In my project, I am making a double-padlock list in C, where it has simple objectives, such as adding at the beginning or end, removing a specific or zeroing. I took a shallow code and was adding…
-
0
votes1
answer88
viewsList information of inserted objects in a Linkedlist
I am implementing an exercise requested in class regarding the insertion of objects in a Linkedlist (queue), but I do not know how to print the information of the objects on the screen. Follow the…
-
0
votes1
answer382
viewsRemove empty list in Python
os.chdir(pasta) lista = [] for air in os.walk('.'): if lista != []: lista.append(air) print(lista) Could someone tell me why I can’t print the folders? If I take the if, folders appears, but also…
-
0
votes1
answer31
views -
0
votes1
answer39
viewsCheck if there is an item in the array
I have an API that returns me a JSON with a list of products and I have a list of products I want to check if they exist in the list of products That part I already got But what I’m not getting is…
-
0
votes2
answers501
viewsCreate array/list with indexes
Good morning guys, I started learning Python a few days ago and, doing some tests with lists around here I got some questions. 1 - In PHP I can create an array by defining the indexes of its values:…
-
0
votes1
answer73
viewsSingle values average filter in dictionary list
I have the following dictionary list in Python 3.7: a = [ {'linha': 0, 'porcentagem': 1.0, 'id': 3, 'nome': 'bruno'}, {'linha': 8, 'porcentagem': 1.0, 'id': 7, 'nome': 'teste'}, {'linha': 12,…
-
0
votes2
answers75
viewsGet an item from a referenced list
I am trying to get the items from a generic list that I pass for reference to a class, but I only have as return the name of my project concatenated with the class. Below is a code fragment…
-
0
votes2
answers666
viewsSimple Java chained list position change
I have to create a method that changes position two elements into a simple chained list, but I’m having difficulties in creating this method. In this case the method receives two elements of the…
-
0
votes1
answer17
viewsError in listing interface
I’m doing a college exercise, and when I click the resposable button for listing, my table is redone whole, so I lose the names that should be on the first line, which are: -Codigo -Limite do Prazo…
-
0
votes1
answer50
viewsHow do I add the "same" object to a list and change a property?
I have to send a list of entitys to a method that will make the Insert of these entitys in the bank. This entity represents an inscription of a patient who will enter some waiting queues of…
-
0
votes2
answers299
viewsR how to extract the first value from a date list.
I have this list of data:: base_list <- list(structure(list(POP_84 = 17.7, POP_92 = 18.8, POP_99 = 19.7, POP_02 = 20.5, POP_04 = 21.2, POP_09 = 23, POP_11 = 24.5), row.names = 149L, class =…
-
0
votes2
answers932
viewsHow to store values of a list in individual variables without knowing its size?
I need to assign each integer value within a list of at least 1 item and at most 10 items to a separate variable. Then decrease 1 of each item, add them and print the result. These numerical values…
-
0
votes1
answer344
viewshow to do total in list elements Python Django
Enter primary data (raw data)where it has values . Flot and I am already calculating the total in function "totalv2" ta run class Funcionario(models.Model): Custocoleta = models.Decimalfield(…
-
0
votes1
answer1445
viewsDraw an item from the List, and then draw another item from a list with the name that was drawn from the first list
Good morning, everyone. I have a master list called "Livros". I need to draw a name from that list Livros. After choosing one of the names, I need to draw again, but now I need to choose from…
-
0
votes1
answer47
viewsDisplay in a Messagedialog the contents of List<String> message = new Arraylist<String>();
Good night, I need to display the contents of the message array in a Message Dialog: List<String> mensagem = new ArrayList<String>(); In the course of code I add some text to the array…
-
0
votes1
answer57
viewsAndroid - Arraylist is not being filled
I created a code with a contact class public class Contato { private String nome; private Integer foto; private String ramal; private String setor; private String email; public Contato(String nome,…
-
0
votes1
answer4221
viewsHow to turn a list into dataframe pandas?
I am new in the language, after the execution of the following code, the result of the append made is a list. I needed this information in dataframe, but so far I could not find a way to convert…
-
0
votes2
answers114
viewsA function stores specific elements of a list in another list
I want to make a function that takes a list of ordered numbers and two numbers (one bottom and one top) and returns a new list with the elements of the first list between the two numbers. Example:…
-
0
votes1
answer62
viewsMinimum value of a list within another python list
Hello. I have a situation I managed to solve by looping. I would like to know if there is any way to simplify what I did, using Arabic or other language resource. I have a list and within it another…
-
0
votes1
answer42
viewsLoad a json list in JS
I would like to upload a list of my JSON file to use in my Javascript , to use the.table() console with the provided information , This is my Javascript code : fetch("infos.json") // especifique o…
-
0
votes0
answers48
viewsModule does not find def attribute
I have to find in the question, the email and wpp by the name that is inserted, and I need to put it in a def in task.py for example, I did so so: import __init__ def encontrar(elemento): pos_i =…
-
0
votes1
answer74
viewsOperating on a list of lists with the conditional
I’m trying to use list comprehension in a code but I "zipped" in using the structures for and if in a certain part. Can someone help me? Basically I have a list called "sup" whose 2000 entries are…
-
0
votes2
answers274
viewsLimit the amount of decimals of a floats values that fill a list
Hello Stackoverflow community, good morning. I’m trying to develop a code that calculates the numerical values obtained from a physics equation Here is the form of the equation, where k , T and pi…
-
0
votes1
answer102
viewsRemove an element previous to the element specified by the user in a List. C
I have to create a program, which will create a dynamically double-chained list and this program should do the following: the program will read values that the user writes and add to the list. Then…
-
0
votes1
answer41
viewsHow to capture data correctly from the list?
I put the code down on onCreate and onResume, but of the problem when putting in the onResume. Whenever I return/leave the editing screen, onResume goes into action and goes through the whole list…
-
0
votes2
answers1029
viewsImage in Listtile - Flutter
I’m not able to leave my image in my Listtile, when I try to scale it only goes horizontal and never vertical, example: Following code, I’m trying to scale with the property Radius:…
-
0
votes1
answer79
views -
0
votes2
answers141
viewsHow to remove elements from a javascript list
I’m making a small javascript program to generate a tabulation. To prevent duplicates from occurring, I put in a small code snippet to clear the list before generating the table let numero =…
-
0
votes1
answer563
viewsReplace blank data in a list (Python)
I have a list that will receive input data and make a for loop to go through the list to find empty strings to replace them. I’ve tried to use lista.remove() and lista.append(), but the value that…
-
0
votes1
answer4227
viewsCreate an array list in the flutter
I have two pages. On the first page I want to return a list. I want to insert in this list the values that come from the second page. So the flow is more or less the following: I enter the second…
-
0
votes1
answer620
viewsImplement queue (FIFO) using an array
I have a fixed size 20 list, I need the user to add registrations, however, when I click on "show" option, it presents me only the first element I added in all positions. For example, if you type…
-
0
votes1
answer875
viewsList directories and PHP files
Hello, I have a PHP code that works well for what was proposed, but I need some adjustments to it. The code in question already lists the directories and the files, but in directories that I have…
-
0
votes7
answers1969
viewsHow to remove repeated numbers from a python list
Hello guys I’m doing a course in python and currently I Completed this exercise. Write the remove_repeated function that takes as a parameter a list of integer numbers, checks whether such a list…
-
0
votes1
answer79
viewsSlice and store Ict in pyhon
I have the following class: class Buckts: def __init__(self, keys, palavras, tamanhoP): self.listaBuckts = dict() self.keys = list(keys) aux = list(zip(keys, palavras)) self.aux2 = list() for i in…
-
0
votes2
answers265
viewsSplit sublist in python
Good team, I have a method that receives a list and from it creates sub-list and attaches in Buckets: def indexar(self, keys): buckets = [[] for _ in range(10)] for i in keys: for ii in range(10):…
-
0
votes1
answer343
viewsSplit dictionary in python
Good guys, even for help here from the forum, I got a function that creates sub-list from sub-lists according to the division by 10, is easier to understand with the code: def indexar(values): #…
-
0
votes2
answers436
views1) Read a 10 x 10 matrix and write the location (row and column) of the highest value
CHALLENGE OF THE QUESTION 1 | Now, do not forget to inform which is the position of this higher value. There’s no way I can show the position of the highest value: from random import randint…
-
0
votes1
answer43
viewsLoop to append Googlesearch to multiple elements of a list
Hello, What’s up, little community? I am a beginner with Python and programming in general and I would like to ask a question. Briefly describing the problem: I am using Googlesearch to return the…
-
0
votes1
answer47
viewsHow to apply the same condition/operation for each element of a vector in C
Hi, guys! I need to perform the same operation for all elements of a given vector. How to do this? More specifically, I need to check if an element any "x" has, in its two adjacent positions larger…