def binSearch(arr, val):
i = bisect_left(arr, val)<EOL>if i != len(arr) and arr[i] == val:<EOL><INDENT>return i<EOL><DEDENT>return -<NUM_LIT:1><EOL>
Function for running binary search on a sorted list.

:param arr: (list) a sorted list of integers to search
:param val: (int)  a integer to search for in the sorted array
:returns: (int) the index of the element if it is found and -1 otherwise.