Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fulldata={}
- line = "February 29, 2029 at 07:31AM You entered the office"
- matched = re.search('(^\w.*\d) at (\d.*\w) You (\w.*\w) the office', line)
- if matched:
- date = matched.group(1)
- time = matched.group(2)
- action = matched.group(3)
- print("Date#",date,"#")
- fulldata[date][action] =time
- else:
- print ("ERROR")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement