Question from the Python test

Write a Python function that returns a copy of anotherlist with number appended to the end.

Hard

What can be said about the my_function function?

def my_function(number, otherlist=[]):
   """Returns a copy of anotherlist with number appended to the end"""
    otherlist.append( number )
    return anotherlist[:]
Author: Antoine BrennerStatus: PublishedQuestion passed 1972 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!