Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created April 6, 2019 22:31
Show Gist options
  • Save dipanjanS/16fc7057fa98f98c25a1df81beea4205 to your computer and use it in GitHub Desktop.
Save dipanjanS/16fc7057fa98f98c25a1df81beea4205 to your computer and use it in GitHub Desktop.
status_pattern = r'\s(\d{3})\s'
status = [re.search(status_pattern, item).group(1) for item in sample_logs]
print(status)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment