Shouldn't this just be:

```python
while attrs_line.strip() not in set('cC') \
```