After iterating over a list with a for loop, in order to extract only a few values, I get this:
['Dell Precision 380 (3.73 GHz, Pentium Exteme Edition 965)', '11.6']
['Dell Precision 380 (3.8 GHz, Pentium 4 processor 670)', '11.5']
What I need to do is to extract the information between the parenthesis in each line and put it into another list, but I'm struggling to find the right code.
I have tried the method described here: How do I find the string between two special characters?, but I get an error because the string is in a list.
I have also looked at the documentation for Re, but I'm not sure how to apply it in this case.
\((.+)\)to find everything between parantheses in a given string, in order to actually utilize it you'd usere.findallor compile the pattern and usepattern.findall\((.+?)\)to get the shortest.