Python 2.7.10
I wrote the following code to test a simple callback function.
def callback(a, b): print(\'Sum = {0}\'.format(a+b)) def main(
Here's what you wanted to do :
def callback(a, b): print('Sum = {0}'.format(a+b)) def main(a,b,f=None): print('Add any two digits.') if f != None: f(a,b) main(1, 2, callback)