Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- cmp=re.compile(r'^(LG)*$|^(GL)*$|^[LR]*$|^(RG)*$|^(GR)*$')
- mtch=cmp.match(command)
- if mtch:
- if mtch.group()==command:
- return "YES"
- else:
- return "NO"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement