In Python 2, you can use format to pass named parameters and it plugs the names into the variables. Note you can quote strings with single quotes or double quotes, so you can prevent having to escape double quotes by using single quotes:
>>> name = 'John'
>>> file = 'hello.txt'
>>> print 'ERROR: did not find "{name}" inside "{file}"'.format(name=name,file=file)
ERROR: did not find "John" inside "hello.txt"
A shortcut for this is to use the ** operator to pass a dictionary of key/value pairs as parameters. locals() returns all the local variables in this format, so you can use this pattern:
>>> name = 'John'
>>> file = 'hello.txt'
>>> print 'ERROR: did not find "{name}" inside "{file}"'.format(**locals())
ERROR: did not find "John" inside "hello.txt"
Python 3.6+ makes this cleaner with f-strings:
>>> name = 'John'
>>> file = 'hello.txt'
>>> print(f'ERROR: did not find "{name}" in "{file}"')
ERROR: did not find "John" in "hello.txt"