Here's a trick for less nesting:

```python
if not course:
    continue

# Rest of code ...
```

Handy with the line limit PEP8 suggests.