Answer the question
In order to leave comments, you need to log in
What is the correct way to slice such a list in Python?
The essence of the problem: I have a list with n-number of elements. I need to cut this list into groups, each of which will have its own data. I will give an example in code. It is necessary to make it so that in one list there are five different lists.
# Есть список с 10-ю элементами:
(input): data = ['123', '865', '124', '975', '245', '097', '127', '765', '532', '869']
# Нужно нарезать список data на 5 групп и добавить все в один список, чтобы получилось так:
(output): slice_data =
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question