Home › Forums › KX Academy › Exercise 16: – Use indexing to find the middle value in the `sortedFares` list. › Reply To: Exercise 16: – Use indexing to find the middle value in the `sortedFares` list.
-
Hi @natasha-lakhpaty the indexing approach taken in the exercise solution returns the value at the index that is halfway between the sorted list.
The med function doesn’t have to return an actual distinct value that exists in the list, but instead the arithmetic middle value. Have added a simpler example here – hope this helps!