Halfsies

Write a function called midway() that will return the middle number in a list.

The function will receive a Python list passed in as a parameter. The middle number is the number halfway through the list. In Python, the len() function will return the length of a list. For example:

You may assume that the list will always have at least two values. If the list doesn't contain an odd number of items, you may return either of the "middle" numbers.

Examples:




©2017 Graham Mitchell