But actually it could be done as a lambda I think 
```python
wait_for(lambda: [file for file in os.listdir('.') if file.endswith('.py')], fail_condition=[])
```