5. Suppose we have a list V where each element represents the visit dates for a particular patient in the las* month. We want to calculate the highest number of visits made by any patient. Write a function MVisit(Lst) to do this.

A sample list (V) is shown below :
V = [[2, 6], [3, 10], [15], [23], [1, 8, 15, 22, 29], [14]]
For the above given list V, the function MVisit( ) should return the result as [1, 8, 15, 22, 29].

# Code
V = [[2, 6], [3, 10], [15], [23], [1, 8, 15, 22, 29], [14]]
c = 0 # count the number of visits
hv = None # the visits
for i in V:
if len(i) > c: # compares numbers of visits
c = len(i)
hv = i
print(‘Highes number of visits :’, hv)
# Output
Highes number of visits : [1, 8, 15, 22, 29]