list tag

251 questions


1 answers
113 views
0
I changed only one element in the list, but the whole element changed. Why is that?

[[1, 1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1]] I wrote it like this. myList = [[1] * 4] * 3I changed only one value at the beginning, but the whole value of the element changed.myList[0][0] = 5 #[5, 1, 1,...


1 answers
83 views
0
Please tell me how to approach the list from the back to the front

array = [0,10,20,40]I'd like to approach from the back in order of 40->20->10->0.In C++,for (i = array.length() - 1 ;i >= 0; i--)We wrote it togetherWhile writing fori in list on Python,Is...

2 years ago

1 answers
106 views
0
(Python) Creating a list of labeled text file data

Text file content is 1 0.552344 0.384028 0.159375 0.1958331 0.780078 0.595833 0.236719 0.133333It's like this After executing Python code [1 0.552344 0.384028 0.159375 0.195833] , [1 0.780078 0.59583...

2 years ago

1 answers
100 views
0
Python - Find the desired value in the element in the dictionary form in the list

list = [{ key1:value1, key2:value2, key3:value3,........}, { key:value, key2:value2,...}, { key:value, key2:value2,...}] The elements of the list are in the form of DickshireHow can I find the value u...

2 years ago

1 answers
133 views
0
The difference between append and extend in Python

What is the difference between append() and extend() in the Python list method?

2 years ago

1 answers
117 views
0
To determine the length of an array

Is arr._len_() the only function that returns the array length?As far as I know, I've learned that it's not good to write functions or variables that start with an underline (_), but I can't find any ...

2 years ago

1 answers
128 views
0
Can't I change Set to List without creating List?

Map<String, List> mainMap = new HashMap<String, List>();for(int i=0; i<something.size(); i++){ Set set = getSet(...); //return different result each time List listOfNames = new ArrayLis...

2 years ago

1 answers
47 views
0
Is there a built-in function that pulls a column from the nested list?

If there is an overlapping list such as lst in the code below, take out the column you want and make it a listIs there a built-in function?Is there a embedded function that runs the second for loop pa...

2 years ago

1 answers
144 views
0
How to make it run immediately by pressing the command key, not by pressing the python enter key.

In the list, I want to write code that moves side by side according to the keyboard a and d keys, but when I execute it, I want to execute it right away when I press the key a and enter it, but what s...

2 years ago

1 answers
50 views
0
I want to make an endless list on Android.

I'd like to show you a little bit of the items on the list and let the user scroll and get additional items when they reach the end of the list. What can I do?

2 years ago
« - 14 - »

© 2024 OneMinuteCode. All rights reserved.