# Chapter 10 - Lists - Section 10.8 - Returning a List from a Function - Check Point - MyProgrammingLab - Page 334: 10.18

a) [1, 2, 3] [2, 3] b) [1, 2, 3] [1, 2, 3]

#### Work Step by Step

a) def main():       list1 = m(1)       print(list1)       list2 = m(1)       print(list2) def m(x, lst = [1, 1, 2, 3]):       if x in lst:           lst.remove(x)     return lst main() -$Output:$ [1, 2, 3] [2, 3] --- b) def main():     list1 = m(1)     print(list1)     list2 = m(1)     print(list2) def m(x, lst = None):    if lst == None:     lst = [1, 1, 2, 3]     if x in lst:       lst.remove(x)       return lst main() -$Output:$ [1, 2, 3] [1, 2, 3]

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.