Skip to content

Instantly share code, notes, and snippets.

@titaneric
Created November 14, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save titaneric/0a9856c5c05cbc5083525d742ed6bb33 to your computer and use it in GitHub Desktop.
Save titaneric/0a9856c5c05cbc5083525d742ed6bb33 to your computer and use it in GitHub Desktop.
To tomdannis @ptt
l = ["1060501", "1. AAA 2. BBB", "ID1234", "1060502", "1. BBB", "ID0000"]
selected_list = [l[i] for i in range(0, len(l), 3) if "AAA" in l[i+1]]
print(selected_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment