is there a way to check for a certain pattern such that when is use the function the elements in the list fulfilling the pattern can be printed…e.g.
i have a list
abc=['adams, brian','smith, will',' and j.smith. there is a long string here','some more strings','some numbers','etc etc']
now what i want is that i get all the strings that have the format 'xyz,abc' and 'x.abc' out of the list.
it would be a great help if u guys could tell me of a generalized way of how i can look for a certain pattern in a list.
I’d use regular expressions:
Functional way of flattening this result: