python - string 格式化比较
“Old-school” String Formatting in Python
Before Python 3.6, you had two main ways of embedding Python expressions inside string literals for formatting: %-formatting and str.format()
. You’re about to see how to use them and what their limitations are.
Option #1: %-formatting