Test Yantra interview question

Write a binary search code on a list to find an element.