Generation

generate functionMon, 26 Dec 2022

Преобразуйте код ниже в dict comprehension dct = {} for el in lst: dct[el[0]] = el[1:] dct

lst = [['a', 1, 3], ['b', 2, 4], ['c', 5, 6]] {el[0]: el[1:] for el in lst}

Questions about programming?Chat with your personal AI assistant