Python's many ways of string formatting — are the older ones (going to be) deprecated?
Python's many ways of string formatting — are the older ones (going to be) deprecated? Question: Python has at least six ways of formatting a string: In [1]: world = “Earth” # method 1a In [2]: “Hello, %s” % world Out[2]: ‘Hello, Earth’ # method 1b In [3]: “Hello, %(planet)s” % {“planet”: world} Out[3]: ‘Hello, …