Answer
The program will print :
Index out of bound
Work Step by Step
Inside the main function's try block function f will be called. In the try block of function f the print statement will try to print the element at 3rd index of the string, but the length of string is only 3 so the index is out of bound. There is no except block to handle IndexError in function f so this error will move to try block of main function. This try function have an except block to handle IndexError so the control will go there and Index out of bound will be printed.