No se puede descubrir cómo funciona la sustitución de cadenas en Python 3.x [cerrado]

En Python 2.x se te permitió hacer algo como esto:

>>> print '%.2f' % 315.15321531321
315.15

Sin embargo, no puedo hacer que funcione para Python 3.x, probé diferentes cosas, como

>>> print ('%.2f') % 315.15321531321
%.2f
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'

>>> print ("my number %") % 315.15321531321
my number %
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'

Luego, leí sobre el método .format (), pero tampoco puedo hacer que funcione.

>>> "my number {.2f}".format(315.15321531321)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'float' object has no attribute '2f'

>>> print ("my number {}").format(315.15321531321)
my number {}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'format'

¡Me encantaría cualquier consejo o sugerencia!

Respuestas a la pregunta(2)

Su respuesta a la pregunta