You could do it in one line:
```python
for l in res.splitlines():
```
Also, most of the time longer names are better than one-letter names, so I'd write:
```python
for line in res.splitlines():
```