Searching a list of objects in Python,[x for x in myList if x.n == 30]