Advertisement
here2share

# re_two_matches.py

Feb 5th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. # re_two_matches.py
  2.  
  3. import re
  4.  
  5. zzz = ["guru99 get", "guru skip", "guru99 give"]
  6. for element in zzz:
  7.     z = re.match("(g\w+)\W(g\w+)", element)
  8.     if z:
  9.         print((z.groups()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement