i have a text like this:
text = 'Ronald Mayr: A\nBell Kassulke: B\nJacqueline Rupp: A \nAlexander Zeller: C\nValentina Denk: C \nSimon Loidl: A \nElias Jovanovic: B \nStefanie Weninger: B \nFabian Peer: C \nHakim Botros: B\nEmilie Lorentsen: B\n'
I need to get all the names that have ":B" value.. for example Bell Kassulke, Elias Jovanovic
I'm trying something like this
stu = re.findall('\w+.*.: B',text)
but this one gives me list like this:
['Bell Kassulke: B',
'Simon Loidl: B',
'Elias Jovanovic: B']
While I only need the names not this whole list. What exactly can I do?