Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my_str ='·in this match, dated may 1, 2013 (the "the match") is between brooklyn centenniel, resident of detroit, michigan ("champion") and kamil kubaru, the challenger from alexandria, virginia ("underdog").'
- champion = re.findall(r'("champion"[^.]*.)', my_str)
- print(champion)
- >> ['"champion") and kamil kubaru, the challenger from alexandria, virginia ("underdog").']
- underdog = re.findall(r'("underdog"[^.]*.)', my_str)
- print(underdog)
- >>['"underdog").']
- brooklyn centenniel, resident of detroit, michigan
Add Comment
Please, Sign In to add comment