human
python how to search an item in a nested list
assistant
Here is some code to get a list of items form nested list `li` where third element of each item contains string 'ar'

[x for x in li if 'ar' in x[2]]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.