I am trying to format a text. Below is my code.
str = """
def services = {0}
try {
// try code block
} finally {
// finally code block
}
""".format(json.dumps(services))
But I am getting following error.
Key ' // try code block ' has no corresponding argument
Any help would be appreciated.
Try with {{}}. Like
try {{
// try block her
}}