<s>[INST] Here is the piece of code that i want to optimize. The function process_list takes a list of tuples and returns two lists, one for 'A', one for 'B'. I have written a simple solution using a for loop but i would like to know if there is a way to optimize this using map() function. I did try to use the map() function but i end up with a map object and i don't know how to convert it to a list.[/INST]