August 2019
Beginner
482 pages
12h 56m
English
Lastly, we want to show a legacy way to format, which uses percentage symbols. This approach predates Python 3. Don't use it—just be aware that it exists and can be seen in some old code bases. There is nothing particularly wrong with this approach, of course, but it is considered a legacy. Subjectively, we think that it is less readable, but that is our personal view:
>>> name = 'David'>>> print('Hello mr. %s' % name)Hello mr. David