An open API service indexing awesome lists of open source software.

https://github.com/candytale55/middle_element---python

Function middle_element takes one parameter lst(a list). If there are an odd number of elements in lst, the function should return the middle element. If there are an even number of elements, the function should return the average of the middle two elements.
https://github.com/candytale55/middle_element---python

Last synced: about 1 year ago
JSON representation

Function middle_element takes one parameter lst(a list). If there are an odd number of elements in lst, the function should return the middle element. If there are an even number of elements, the function should return the average of the middle two elements.

Awesome Lists containing this project