def query(name):
mylist = [{'name':'book','number':5},{'name':'pen','number':4}]
target = list(filter(lambda mylist: mylist['name'] == name, mylist))
return 'name: {}, number: {}'.format(target[0]['name'], target[0]['number']) if len(target) else 'No result'
print(query('pen'))
ZGVmIHF1ZXJ5KG5hbWUpOgogIG15bGlzdCA9IFt7J25hbWUnOidib29rJywnbnVtYmVyJzo1fSx7J25hbWUnOidwZW4nLCdudW1iZXInOjR9XQogIHRhcmdldCA9IGxpc3QoZmlsdGVyKGxhbWJkYSBteWxpc3Q6IG15bGlzdFsnbmFtZSddID09IG5hbWUsIG15bGlzdCkpCiAgcmV0dXJuICduYW1lOiB7fSwgbnVtYmVyOiB7fScuZm9ybWF0KHRhcmdldFswXVsnbmFtZSddLCB0YXJnZXRbMF1bJ251bWJlciddKSBpZiBsZW4odGFyZ2V0KSBlbHNlICdObyByZXN1bHQnCgpwcmludChxdWVyeSgncGVuJykp