String formatting in Python version earlier than 2.6 September 15, 2023 by Tarik The str.format method was introduced in Python 3.0, and backported to Python 2.6 and later.