Sobes.tech
Middle

# Python - identify the problem in the code and rewrite it without errors # Add a user to the list and return this list. # If the second argument is not specified during the call, return the user in the response. def add_user(user, users=[]): users.append(user) return users print(add_user("User")) # Create a list of three functions, where each function returns its number when called. # The first function should return - 0, the second - 1, the third - 2: funcs = [lambda: i for i in range(3)] print([f() for f in funcs])