Task: Query MongoDB for Documents Where a Field Exists and Is Not Empty String
Task: Query MongoDB for Documents Where a Field Exists and Is Not Empty String: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script using PyMongo that queries a MongoDB collection to find all documents where the lastname field exists AND is not an empty string ( "" ).
The task
Write a Python script using PyMongo that queries a MongoDB collection to find all documents where the `lastname` field **exists** AND is **not an empty string** (`""`).
Part of PrimeIntellect/Terminal-Lego-15k.