список
Working with python 3 arrays
The question is why when I create an array like this:
x = [[]]*3
And then I'll add the element via the append method. Fo ... ,[]]
Then using the same append method, as I indicated above, I will get this array:
[[1],[],[]]
Why is this happening ?
Search in a doubly linked list
An array of instances of the contact structure is read from the file. These instances form a doubly linked list. The search() ... Search(Head,Tail,NumOfPosition,kol_el);
}
}
} while (rezh != 4);
system("pause");
return 0;
Search in a doubly linked C++list
The task is to make a doubly linked list in which the class methods add/remove a list item, sort the list, display the list i ... e_end();
lst.Show();
lst.Delete_end();
lst.Add();
lst.Delete_first();
lst.Show();
system("PAUSE");
}
General drop-down menus-a list for multiple frames
There is a page that renders 4 frames.
Each frame has three absolutely identical lists (In the example: "List_1", "List_2" an ... p://www.ustream.tv/embed/17824093?v=3&wmode=direct">Имя_сайта_10</option>
</select>
</div>
Lists: output, fill, list search - C++
Hello, can someone tell me and show me how to correctly fill in, output a list that is based on a structure with 5 elements o ... }
With this search, only one element is output, and how to make all the elements that fall into the condition be output?
Entering n elements in a single line
Here is the program:
i = 1
k = 0
p = 0
n = int(input())
for i in range(1, n+1):
a = int(input())
if a % 2 == 0:
k + ... ements can be entered into the terminal only in this way:
3
1
2
3
And you need it like this:
3
1 2 3
How do I do this?
Delete list items by condition
There is a list of
lst = [0, 95, 0, 76, 0, 23, 68, 0, 23, 156, 95]
You need to delete each element following 0
To get th ... ,0,156,95]
The str.index() method doesn't help me, since it only returns the first match, and c enumerate doesn't work yet.
How do I find the index of a list in a list that contains the point closest (by distance) to the point "n"?
The answer must be 1, because the nearest value in the 1 index list.
point = [
[(540, 420), (620, 300), (370, 140), (2 ... , 15)
items = []
for idx, area in enumerate(point):
for x, y in area:
items.append((idx, x, y))
2-list comparison function in Haskell
The work forced me to study Haskell. Faced with the need to write a function, the input of which is served two lists. It comp ... must be in the same order. I sit thinking how to do it. The elem function comes to mind. but I don't know how to attribute it
How do I check if a string contains a word from a list?
For example, there is a list of
words = ["Авто", "Велосипед", "Самолет"]
And for example the string
str = "Быстрый автомобиль"
You need to return True, because the line has "auto"