Question: write function called list_median that takes a list and returns a new list. If the list has even numbers of elements, the new list will
the new list will include only one element. For example:
>>> t1 = [5, 1, 2, 3, 4]
>>> list_median(t1)
[3]
>>> t2 = [8, 3, 10, 6]
>>> list_median(t2)
[6, 8]
Step by Step Solution
3.36 Rating (146 Votes )
There are 3 Steps involved in it
You can create a listmedia n function in Python that takes a list and returns a new li... View full answer
Get step-by-step solutions from verified subject matter experts
