Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with python homework 1. Implement the function flatten(1) that takes

ID: 638407 • Letter: I

Question

I need help with python homework

1. Implement the function flatten(1) that takes one parameter. The parameter is intended to be a list of lists. The function returns one list that contains all the elements in the lists. If the list entered by the user is empty, the average returned should be []. The information below shows how you would call the function flatten(1) and what it would display for several different user interactions IDLE tmp 1g2fv0 python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v. 1600 64 bit CAMD64)] on win32 Type "copyright", "credits" or "license()" for more information. RESTART >flatten(L]) Lj laten(I[1,2].03,41. [5,6]1) ai21 >>>flatten(L[1,211 >flatten [[1,2],[[3,411,[5,611) SyntaxError invalid syntax SyntaxError: invalid syntax >>flatten(DC1,21,[03,411, 05,611)

Explanation / Answer

1)

2)

3)