list tag

251 questions


3 answers
51 views
0
What is a good code for counting the same value values in Python list-map data?

origin = [ {'pk':1, 'attr':'MAN'}, {'pk':1, 'attr':'WOMAN'}, {'pk':1, 'attr':'BOY'}, {'pk':1, 'attr':'MAN'}, {'pk':1, 'attr':'MAN'}, {'pk':2, 'attr':'MAN'},]result = [ {'pk':1, 'MAN':3, 'WOMAN':1, 'BO...

2 years ago

2 answers
66 views
0
It's a question about the Python list

Hello. I have a question while studying comparing two lists in Python.num_1=[2,8,3,4,5]num_2=[4,6,3,1,3]print(num_1<num_2)I wrote and executed the code like this, and True was printed. By the way, ...

2 years ago

1 answers
84 views
0
Separating list elements by separator

col_list = ['FLIGHT_DATE\tFLIGHT\tDEP_AIRPORT\tARR_AIRPORT\tSALABLE_SEAT\tRES_PAX_CNT\tADULT_PAX_CNT\tCHILD_PAX_CNT\tBOARD_PAX_CNT']I'd like to split this up by \t.What I did was[i.split('\t') for i i...

2 years ago

1 answers
45 views
0
This is a list problem question. if list[j]==list[j+1]: IndexError: list index out of range

A 'run' is a sequence in which the same value is repeated. Write a program that calculates the longest run from the following list. For example, the length of the longest run in the list with the foll...

2 years ago

2 answers
40 views
0
Can you extract two indexes from the list (using for...))

I tried to combine Ji-Soo Young-Cheol-hee and extract her name (e.g. Ji-hee, Su-cheol, Young-soo, etc.).So the desired result is Jihee 40 150Water iron 50 200Youngsoo 45 190....That's what I wanted to...

2 years ago

2 answers
91 views
0
Private error during Java list link implementation.

Follow the List Link implementation example and continue error: unexpected type curr.next() = curr.next(); //Error ^ required: variable found: valueAn error is encountered as it pops up.There is n...

2 years ago

2 answers
87 views
0
Delete Python List Max String

It's PythonA = Delete the maximum string from the list ['c', 'bad', 'base', 'oracle', 'pandom'] (delete all strings of the same length if any) (ex. oracle and random) I know the maximum string and I k...

2 years ago

1 answers
54 views
0
Python rows How to fill 5 even if the length is less than 5

Hello, masters! I'm asking a question because it doesn't work out well after trying it for a few days alone. def make_news_cnts(self): rows = self.get_news_issue() row_html = get_row_html(rows) new...

2 years ago

1 answers
65 views
0
I don't know why you attached conditional statements in the example code of the dual link list program. (feat. C easily written data structure book)

Hi, everyone. I am a student preparing to return to school through a book called Data Structure Written Easily in C Language.I was looking at an example of creating an mp3 playback program through a d...


1 answers
47 views
0
Creating a shopping list code

1. make a list called groceries with the values banana, orange, and apple.Define these two defaultdictionaries:stock = { banana: 6, apple: 0, orange: 32, pear: 15}prices = { banana: 4, apple: 2, orang...

2 years ago
« - 21 - »

© 2024 OneMinuteCode. All rights reserved.