I recently came across the following piece of code. It doesn’t look valid because of the single instance of triple quotes but seems to work fine. Can anyone explain what’s going on here?
return ("Validation failed(%s): cannot calculate length "
"of %s.""" % (self.name, value))`
All of the strings are concatenated first.
""is an empty string.The substitutions are then made.