I have a basic sort and search loop. At the end I want to thank the user and display the name of the function used. Is there a format
call for doing this?
def arr_sort_binsearch(ar):
item = 8
ar.sort()
l=0
r=len(ar)-1
while l<r:
if (ar[l] + ar[r] == item):
print("{} and {} is: {}".format(ar[l],ar[r],item))
l += 1
r -= 1
elif (ar[l] + ar[r] < item):
l += 1
else:
r -+ 1
print("Thanks for using {}".format(name_of_function?)