Since all elements of list are zero, the median will also be zero. You can calculate median using statistics module's median method.
Here is the code to return the median of the list:
main.py189 chars6 lines
If the list contains an odd number of elements then the median will be the middle element. If the list contains an even number of elements then the median will be the average of the middle two elements.
gistlibby LogSnag