human
Searching a list of objects in Python
assistant
Here is some code to get elements from list `myList`, that have a field `n` value 30

[x for x in myList if x.n == 30]

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