Questions tagged [list]

The list tag may refer to: a linked list (an ordered set of nodes, each referencing its successor), or a form of dynamic array. Not to be used for HTML lists, use [html-lists] instead.

0
votes
0answers
15 views

Python 3: ValueError: min() arg is an empty sequence

I am trying to fix the following error:Python 3: ValueError: min() arg is an empty sequencedef get_min(cur_price,price_list):min_cost=[] for j in price_list:if cur_price ...
0
votes
0answers
34 views

Entering Values, and adding specific types

Trying to figure out how to work a list of user input integers into separate categories and adding those categories together, and I'm stuck. This is what I have so far: def main():again='y'...
0
votes
2answers
30 views

Python seems to automatically convert a list to a string, after which .append() and .pop() are unusable

I'm using Python 3.6 and PyCharm if that matters at all. I'm also fairly new to Python programming (especially working with files) so sorry if I'm missing something obvious.I am trying to make a ...
0
votes
2answers
26 views

Iterating a file with integers into variables (unknown file size)

I’ve been trying to build a basic program that reads a file with two integers (could be empty or have a million entries) separated by a space. It looks like this (corresponding to the day of the week ...
-2
votes
3answers
42 views

Why In custom listview is not working with setOnItemClickListner?

I have a list view with two text views and one edit text in each row listView.setOnItemClickListener() is not working.listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {...
-4
votes
0answers
29 views

How can i append a list in to a string to obtain .txt file?

Is it possible to append a list into a string?I have a string ('a b c') and I'd like to append a list ['1 2 3; 4 5 6'] in order to have a txt.file like this a b c1 2 34 5 6This is ...
0
votes
2answers
32 views

Regular Expression in Middle of a String in a List (Python)

I'm trying to use a regular expression to match a pattern in the middle of a string where the strings are also in a list. I can find the solution to one problem or the other, but confused on how to ...
0
votes
0answers
34 views

select random item from list in foreach [duplicate]

I want select 5 random item from list this is my code:InstaSharper.Classes.Models.InstaLikersList post_Details;foreach (var item in post_Details){await Task.Delay(10);_addUser=new ...
0
votes
0answers
33 views

JList setSelectedValue not working

I have a JList in Swing working bad. I list all items from Database into the list with no problem with this code.My code:Integer index=null;DefaultListModel<String> model=new ...
-5
votes
0answers
35 views

List Error (IndexOutOfRangeException) [on hold]

I'm creating a calendar like the one in Windows 10.I can fill up the chosen month with the month's Dates. In the end, I've nulls left, which I can fill up with the first few Dates of the next month....
1
vote
1answer
35 views

Initialize many strings and each string with many values to a variable. Perform operations on strings [on hold]

This is my second question in stackoverflow and I am a beginner to Python. I don't know how to post a question here. Forgive me for any mistake. Please, help me. Thank you for your valuable time and ...
3
votes
4answers
55 views

How to get diagonals of nested list that pass through a given point - Python

I have a 2d list like this:thelist=[[0,0,0,0,0,0],[1,0,0,0,0,0],[0,1,0,0,0,0],[0,0,1,0,0,0], # (3,2) is the 1 in this row[0,0,0,1,0,0],[0,0,0,0,1,0]]...
-7
votes
3answers
42 views

Python - manipulate result [on hold]

I want to manipulate the result to get from this :[[50, 100],[100, 130],[20, 50, 100, 130]]to this :[[0, 50, 100, 0],[0 ,0, 100, 130],[20, 50, 100, 130]]The idea is to fill gaps between same ...
-1
votes
0answers
6 views

Prolog Trees with the head containing list

When drawing the tree, does the [a,b,c] is again decomposed into a sub tree?Example :-[[a,b,c,d],x,y,z]
0
votes
0answers
17 views

Advantages of numpy column_stack

I have a large amount of data relating to the redshifts and magnitudes of galaxies (29000 of them), which I'll be plotting against each other and performing statistics upon. At the moment, they're in ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,