Retain indexing in string formatting