string fomratting python code example
Example 1: String Formatting with the % Operator
>>> name = 'Bob'
>>> 'Hello, %s' % name
"Hello, Bob"
Example 2: python format string with list
>>> print('Skillset: {}'.format(*langs))
Skillset: C
>>> name = 'Bob'
>>> 'Hello, %s' % name
"Hello, Bob"
>>> print('Skillset: {}'.format(*langs))
Skillset: C