Suppose, I want to convert the following .format()
'ed string to a f'...'
expression:
self.logger.debug('{:10} -- {}'.format('Jira', 'Scan: {} '.format(self.scan_id)))
I can do it easily as:
self.logger.debug(f'Jira -- {self.scan_id}`)
However, I don't want to add the spaces (width) around 'Jira'
manually. How can I do that without first having to create a new variable as in:
s='Jira'
self.logger.debug(f'{s:10} -- {self.scan_id}`)
?