Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
example = [ [1, 2] [3, 4] ] list = [] list.append(???)
list = [ [1, 5, 3], [100, 26, 2], [8, 56, 1] ] r =[[]] for i, l in enumerate(list): for n, v in enumerate(l): r.append(???)
list
result = [[i+5 for i in row] for row in l] print(result)
lst = [[1, 5, 3], [100, 26, 2], [8, 56, 1] ] for i in range(0, len(lst)): for j in range(0, 3): lst[i][j] += 5 print(lst)
for j in range(0, 3):
range(0, len(i))
example = [ [1, 2] [3, 4] ] new_element = [5, 6] my_list = [] my_list.append(new_element) print(my_list) my_list.append([7, 8]) print(my_list)