There is a list of lists. How can I get a list of only the first elements of internal lists without using this construction?
main_list = [[], [], []] def get_first_item_list(): list = [] for main in mail_list: list.append(main[0] return list More precisely not a list of lists, but a list of tuples
[(1157, 'AMD FirePro 2270'), (1156, 'AMD FirePro 2270 1GB Edition'), (1155, 'AMD FirePro 2270 PCIe x1')]
main_list- S. Nickmain_list