It's much faster to do:

```python
if url[:29] == BASE64_SOURCEMAP_PREAMBLE:
```

Especially in cases where you're working with a "constant".