Jul-31-2021, 11:05 AM
(Jul-31-2021, 07:52 AM)ndc85430 Wrote: It's just the old way of allowing you to substitute the values of those variables for the placeholders (%s
and%d
) in the string, as the output shows. These days, you should be using f-strings, though.
Thank you so much , I learn new thing outside the book.
(Jul-31-2021, 08:34 AM)Larz60+ Wrote:print("%s result as %d" % (name, score))
is old style print statement, you should use f-string:
print(f"{name} result as {score}")
Thank you so much, learn new thing. it means my book is old version..