Thanks for responding @Suteja Kanuri​. in the example you provided the 2nd block has javascript code. I couldn't figure out how to use var in python cell.

Im getting invalid syntax error since var isnt expected keyword for python cell.

imageSo i assumed, the second block is python code and changed it accordingly.

arg1 = "Hello";
arg2 = "World";
 
 
pythonCode = """
def my_python_function(arg1, arg2):
    result = "{}" + "{}"
    return result.format(arg1, arg2)
""".format(arg1, arg2);
 
 
result = dbutils.notebook.run(
  "/Users/<user-id>/<notebook-name>",
  0,
  {pythonCode: pythonCode}
);
 
displayHTML(result);

image 

Could you please tell how to proceed further?