x = 1 y = 2 z = 3 def mystery1(a, z): """ What this function does is a mystery. Short of. :param a: (num) :param z: (num) :return: None """ s = 1000 print("Mystery1 s: " + str(s)) print("Mystery1 x: " + str(x)) print("Mystery1 y: " + str(y)) print("Mystery1 z: " + str(z)) z = 100 # def mystery2(): # """ # This function will produce an error as it tries to access a variable out of scope. # :return: None # """ # print("Mystery2 a: " + str(a)) def mystery3(any_list): """ What this function does is a mystery. Short of. :param any_list: (list) list of at least one element :return: None """ any_list[0] = "banana" print("mystery3 any_list contains:" + str(any_list)) def mystery4(any_list): """ What this function does is a mystery. Short of. :param any_list: (list) list of at least one element :return: None """ print("mystery4 any_list contains:" + str(any_list)) any_list = ["pineapple"] print("mystery4 any_list now contains:" + str(any_list)) mystery1(10, 20) print("x is now: " + str(x)) print("y is now: " + str(y)) print("z is now: " + str(z)) # uncomment to produce error. # mystery2() some_list = ["apple"] mystery3(some_list) print("some_list contains:" + str(some_list)) mystery4(some_list) print("some_list now contains:" + str(some_list))