список

How to pass a list to a Python function argument

Hello, there is a code: num = [33,34,35,36,50] num_my = [33,36,50] num_res = [] '''Цикл проверяет повторяеться ли цифра 'nu ... append(number) return num_res num_1 = (result([54,24,1,2,3])) num_2 = (result([34,1,3])) print(num_1) print(num_2)

Bidirectional list

Actually, I have a list, I set it this way struct Node //Структура являющаяся звеном списка { int x; //Значение ... Prev=NULL; //Предыдущий элемент указывает в пустоту Head=Tail=temp; //Голова=Хвост=тот элемент, что сейчас добавили } }

Sorting a list of Python tuples

You need to sort the list of tuples by lexicographic order (alphabetically), but taking into account the 2nd parameter. Ther ... you I understand that something should be used like sort where i[1] == and so on, but something is not coming up. Thanks.

I can't fix the code for the task on stepik.org

The task sounds like this:"Write a function modify_list (l), which takes as input a list of integers, removes all odd values ... e number [6]. Comrades, could you please help me, a silly novice programmer, can you tell me how to solve this embarrassment?

How can I make a two-dimensional array from a one-dimensional array?

I have an array: b = ['Hi!', 'My name is Ivan.', 'I am beginner programier...'] I want to make this one out of it: b = [['Hi!'], ['My name is Ivan.'], ['I am beginner programier...']] That is, an array, where each element is an array.

How do I pass a list to a function argument in Python?

There is such a code and everything works in it as it should be: m=1000 t=10 #по ... e(x,h) integrFiltr(x) Now the output I get is an empty list y, and therefore the second graph is not plotted What's wrong?

How do I fix the IndexError: list index out of range error?

Given an integer array of size N that does not contain the same numbers. Check whether its elements form an arithmetic progre ... i] != d: flag = False i += 1 print(d if flag else 0) Returns an error: IndexError: list index out of range

White list using iptables for proxies

Good evening, everyone! In general, the task is this: I raised the server for the proxy, which I specify in the client config ... rvers, so that users do not use the proxy separately from the vpn. How can this be implemented with iptables? Tell me please.

Search for words from a list in a Python string

There is a list of words, such as: animalslist=['кот', 'собака', 'олень', 'тюлень'] 600+ words long There is a string en ... the most effective way to find out if a string contains words from the list The length of the string is not known in advance

Transfer list items

#mainmenu { border: 1px solid black; widtd: 400px; } #mainmenu ul li { list-style-type: none; di ... Question Why does the page display this line without hyphenation? Waiting The list items must be moved to another line

python kivy, label, button

Please help me how to make the list output in turn when you click the "Truth or action" button def ActionOrTruth(self, in ... widget(self.label) play = ['Правда', 'Действие'] start = random.choice(play) instance.text = start

How do I sort a multi-level list in alphabetical order?

I need to sort the list at each level, which I did below, but the problem is that the DOM tree remains the same, which is com ... лярные выражения</li> </ul> </ul> </body> </html>

How do I create a dynamically loaded multi-level list in pure JavaScript?

Please tell me the algorithm for writing a program for this list. Initially, there are two buttons on the layout: "CATALOG" ... th this. The page should work without reloads. I will write the code myself, please just the algorithm, thank you in advance.

How to make a numbered list with the CSS setting of numbers and reverse order (...3, 2, 1, 0)?

There are portfolio work cards that are made in HTML via a numbered list <ol>. I need to customize the appearance of th ... did not help - the layout of the cards breaks down. The example itself is on this page: http://mitorun.studio/portfolio.html

List based on C++static structure

I implemented a list based on a static structure, and line 5 and 17 disappear somewhere during the output. Please tell me wha ... List[i].spot << ':' << ' ' << List[i].name << endl; }; cout << ' ' << endl; }

Random does not work correctly in the C# loop [duplicate]

This question is already answered here: ... o a separately created file and based on randomly taken values from the head (and not based on the image) works correctly...

Singly linked list, deleting an element, C++

Good afternoon. There is such a code for deleting an item from the list void del(int n) // n - позиция удаляемого элемента { ... blem and a cool idea about using an unsigned variable (I did so in the end). I am very grateful to you, thank you very much!

Creating an array from nested Python elements

Hello everyone Please help me develop an algorithm. There is a source list consisting of dictionaries: [ { 'A': ... the first elements on each level, and I didn't know how to make a recursion for each branch obtained as a result of grouping.

Search for a word by letter, and replace the letter

You need to find all the words with the letter "в" in the word list, and replace the letter "в" with the letter "а" in all th ... ', 'нож', 'ведро', 'Неаполь', 'Виктория', 'материк'] Output: a=['рука', 'нож', 'аедро', 'Неаполь', 'аиктория', 'материк']

Python. List Exploring the types of elements in nested lists

Question. I immediately say why-homework. A list is given, with nested lists ( of unknown nesting depth). Write an algorithm ... , nested lists - I'm slowing down. Obviously, by some recursive method, provided if element == list Please help the audience!