list tag

251 questions


1 answers
113 views
0
To import and sort Python text files into a list

Hong Gil-dong Computer 72Yi Sun-shin Electronics 50a heterogeneous computer 80When the data in the file is like this, The data structure is made of classes with names, departments, and creditsYou want...


1 answers
82 views
0
I want to use the class for the values in the list (add code and error message)

a = class()b = class()c = class()..z = closs()In order to use the class, you must enter Instance = Class(). In this way, I didn't type in from a to z one by one, but I made a list and made a repeat se...

2 years ago

1 answers
36 views
0
Python's 3rd largest method of calculation

def find_3rd max(L): L=[] m=L[0] for i in range(len(L)): if m>i: m=i L.pop(0) L.pop(1) return L[0] I'm going to take the integers into the list L and compare them one by one, sort the largest v...

2 years ago

2 answers
35 views
0
I put Char [] in the list in Java, but I want to save it in Char [] when I take it out again, what should I do?

temp =new char[10]; List Temp=new ArrayList(); Temp.add(temp); //Another object (Listemp)char[ ] Temp;Temp =(char[ ]) temp.get(0);Error Occurred java.lang.IndexOutOfBoundsExceptionSo we're going t...

2 years ago

1 answers
39 views
0
Python) Create a new list with a list

names = [[Joe, Smith], [Mary, Smith], [Pete, Smith], [Lily, Smith], [Heinz, Maus], [Brigita, Maus], [Juergen, Maus], [Jean, St. Croix], [sophie, St. Croix]]With this array last_name_list = ...

2 years ago

2 answers
83 views
0
Ask questions when you repeatedly insert or delete from the python list.

If you use for loop in Python to remove data repeatedly,I'd like to solve the case where I can't find the desired result because I already erased the data while looping.data= [1, 2, 3, 4, 5, 6]for i i...

2 years ago

1 answers
38 views
0
Create a Python N list.

The following N lists with Python list1=[]list2=[]list3=[]...listN=[] I'd like to make something.Write a for statementfor i in range(1,N+1): list%s=[] %iIf you do, the error can't assign to operator a...

2 years ago

1 answers
106 views
0
About the ArrayList add function

List<String> listItems = new ArrayList<String>(); for(BluetoothDevice device : mDevices) { listItems.add(device:mDevices){ } listItems.add (Cancel); } final CharSequence[] items = lis...

2 years ago

1 answers
118 views
0
To do a double list flatten

['[ abc, def ]', '[ ghi, abc ]', '[ def ]']I'd like to change the above double list to a one-dimensional list. That is, ['abc', 'def', 'ghi']I want to convert it as above.Converting using itertools ['...

2 years ago

1 answers
147 views
0
Output speed difference after the for statement result immediately vs for statement result list append (SW Expert question 3750)

Hi, how are you?There was a problem I didn't know while solving SW Expert Academy question 3750 I couldn't find a solution even if I googled, so I asked this question.The problem is that the unauthori...

2 years ago
« - 16 - »

© 2024 OneMinuteCode. All rights reserved.