I have a program that finds the index of the largest value of an array and then from that point it splits it into two subarrays. Here's what it looks like:
def main():
numbers = eval(input("Give me an array of numbers: "))
largest = numbers[0]
ind = numbers.index(max(numbers))
print("Index of the largest number: ", ind)
ar1, ar2 = numbers[0:ind], numbers[ind:]
print("First subarray: ", ar1)
print("Second subarray: ", ar2)
main()
Now I want it count the number of times the first value in the first subarray appears in the second subarray. How can I do that?