Skip to Content
Learn Python by Building Data Science Applications
book

Learn Python by Building Data Science Applications

by Philipp Kats, David Katz
August 2019
Beginner
482 pages
12h 56m
English
Packt Publishing
Content preview from Learn Python by Building Data Science Applications

Legacy formatting

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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python for Data Science

Python for Data Science

Yuli Vasiliev
Introduction to Machine Learning with Python

Introduction to Machine Learning with Python

Andreas C. Müller, Sarah Guido

Publisher Resources

ISBN: 9781789535365Supplemental Content