[Python] "baby" % {"babe": "bebe"}. How could this be useful?

Discussão em 'Python' iniciado por Stack, Agosto 31, 2025.

  1. Stack

    Stack Membro Participativo

    The following is a line in a method of a class in Django:

    url = self.success_url % self.object.__dict__

    Then I tried an example:

    >>> "baby" % {"babe": "bebe"}
    "baby"


    How could this be useful?

    Continue reading...

Compartilhe esta Página