For a given list of values in descending order, write a method in python to search for a value with the help of Binary Search method. The method should return the position of the value and should return -1 if the value not present in the list.
def binarysrch(nums,x):
high = len(nums)
low =0
while low < high:
mid = (low + high)//2
midval = nums[mid]
if midval > x:
low = mid + 1
elif midval < x:
high = mid
else:
return mid
return 1