list tag

251 questions


1 answers
70 views
0
How to use a different class method for a statement

package arrayList;import java.util.ArrayList;public class Student { String name; ArrayList<Book> bookList; public Student(String name) { this.name = name; bookList = new ArrayList<Book>(...

2 years ago

1 answers
49 views
0
Python List -> How to Create Data Frames

en = ['a', 'b', 'c']ko = [Ga, Na, Da]df = pd.DataFrame (data = [[ko, en]], columns = ['Hangul', 'English'])dfI want to put a list in one column, but [] brackets go in together. Is there a way to get r...

2 years ago

1 answers
37 views
0
List index out of range occurred while removing Python list.

L = [2,4,5,8,9,10,3]length = len(L) for i in range(length): if L[i] < 5 : del L[i]print(L)I'm trying to extract a value less than 5 from the list, but I don't know why there's an errorTraceback (...

2 years ago

1 answers
110 views
0
I'm asking for help because I have difficulty understanding the problem (list.append)

scores =[]sum_scores = 0for i in range(5): value = int (input (Enter your grade) scores.append(value) sum_scores = scoresscoresAvg = sum(sum_scores) / 5print(sum(scores))print(scoreAvg)I don't know wh...

2 years ago

1 answers
133 views
0
Insert link list in ascending order

I am studying single linked list with c++ now. I want to insert values in ascending order, but I keep getting errors. Putting 1 and 0 works well, but putting 0 and 1 does not work. Maybe if (p == NULL...

2 years ago

1 answers
32 views
0
To amend the single list with two Python list.

I have two lists, but I want to remove the value in one list and replace it with this string ____. The code I tried is as follows. list_s = [a,b,c,d,e]list_t = [a,b]list_s2 = []cnt =0for value in list...

2 years ago

1 answers
37 views
0
It's a very simple Python question.

If there's a list called [1, 2, 3]If each 1, 2, 3, 10, 20, 30, 40, 50, 60, 70, 80, and 90, there's a total of 9 elements in it, so1: 10,20,302: 40,50,603: 70, 80.90. Like this.When you write a for sta...

2 years ago

3 answers
42 views
0
Can we tie up the same elements in the Python list?

If [Ganada, Ganada, Ganada, Ganada, Ganada, abc, abc, abc, Mabasa, Mabasa]When you have a one-dimensional list, such asWith a two-dimensional list [Ganada, Ganada, Ganada, Ganada, Ganada, [abc, abc], ...

2 years ago

1 answers
123 views
0
Python list.range Syntax Question.

Use the list range to line up (ex. 150, 155, 160, 165....)If you enter the standard weight, it floats like the standard weightI keep on increasing my height by 5 and my weight also increases by 5I'm w...

2 years ago

1 answers
35 views
0
Python List Questions ['a', 5', ['e', 5], ['c', 3], ['d', 3], ['e', 1] --> ['a','b', 5', ['c','d', 3], ['b', 1]

list=['a',5',['e',5],['c',3],['d',3],['e',1]] How do you tie the same numbers together? For example, ['a','b',5],['c','d',3],['b',1]] in the above case.Even if I try for and if, it doesn't come out th...

2 years ago
« - 17 - »

© 2024 OneMinuteCode. All rights reserved.