x = """
def test_add(a, b):
add = a + b
return add
test_add(10, 6)
"""
print(eval(x))
The above code produces following error:
File "<string>", line 2
def test_add(a, b):
^
SyntaxError: invalid syntax
How can i fix this error ?
Note : In this example, 16
should be printed to the console.