Question: Redefined Outer Name 2 (python) Redefined Outer Name 2 2 In an inner block of code, be careful not to redefine variables from outside the
Redefined Outer Name 2 (python)
Redefined Outer Name 2 2 In an inner block of code, be careful not to redefine variables from outside the block that are still in use. Submit the provided code and click on the "Expand for Detailed Error Message" dropdown to determine where the "Redefined Outer Name" error occurs. Then, make changes to the starter code to resolve the error. 1 Hef evens_only(lst: List[List[int]]) -> List[int]: 2 3 4 """Return a list of every element in the sublists of lst that are even >evens_only ([[1,3,61,17,8,101,[4,62]]) 6,8,10,4,62] 8 evens = [ ] for item in lst: 10 for item in item: if item % 2 =-0: 12 evens.append(item) 13 return evens
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
