Fastapi Return Binary Search In Python