Why not do:

```python
whitelisted_tables = "|".join(['{0}'.format(s) for s in _whitelisted_table_prefixes()])
```

Then you don't have to have the special case to remove the last character from the resulting string.