Fix indentation of comments, and clarify stuff going on below:

```python
# determine to prepend/append or overwrite by checking first/last list item
# - input ending with comma (empty tail list element) => prepend
# - input starting with comma (empty head list element) => append
# - no empty head/tail list element => overwrite