Vacation Planning

hi guys, 've seen a similar question but still did not understood the answer, can someone care to explain to me (like im five years old haha)

the vacation planning exercise bellow:

Paris= [200,20,200,‘Paris’]
London = [250,30,120,‘London’]
Dubai = [370,15,80,‘Dubai’]
Mumbai = [450,10,70,‘Mumbai’]
Cities = [Paris,London,Dubai,Mumbai]

def cost_of_trip(flight,hotel_cost,car_rent,num_of_days=0):
return flight+(hotel_costnum_of_days)+(car_rentmath.ceil(num_of_days/7))

def days_to_visit(days):
for city in Cities:
min_cost = min(costs)
return min_cost

what is the “cost=cost_of_trip(city[0],city[1],city[2],days)” and “costs.append((cost,city[3]))” at the 3rd block of code
is doing? i cant see to get my head around it, really
at first i thought it was calling the cities given above, but it ain’t, as it have less cities, and now it kinda seems like is just overwriting or calling out the previous function at the 2nd block, and replacing num_of_days=0 with just “days”

can someone help me?