Skip to content

Instantly share code, notes, and snippets.

@andymccurdy
Created August 9, 2016 01:15
Show Gist options
  • Save andymccurdy/ec110381a2dab1f689e995c198030ae2 to your computer and use it in GitHub Desktop.
Save andymccurdy/ec110381a2dab1f689e995c198030ae2 to your computer and use it in GitHub Desktop.
def purify(numbers):
return [i for i in numbers if i % 2 == 0]
@jbwhite85
Copy link

def median(x):
    med_list = sorted(x)
    if len(med_list) % 2 == 1:
        return the middle index
    else:
        figure out how to divide the middle indexes and return it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment