What is the use of the "format" method in Python?