Created
February 21, 2016 13:33
-
-
Save alfredfrancis/c97a59438dc63acc5188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def doAction(str2): | |
words = str2.split() | |
if words[0] == 'set': | |
a = re.compile(' set an alarm for (\w+ \w*) (am|pm)') | |
m = a.match(str2) | |
if m: | |
print(m.group(1), m.group(2)) | |
setAlarm(m.group(1), m.group(2)) | |
else: | |
print(str2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment