Searching in python/gen