Question: In python with explanation please. 3. Write a function n-letter() that takes a list lst of strings and a non-negative (>= 0) integer n as

In python with explanation please.

In python with explanation please. 3. Write a function n-letter() that takes

3. Write a function n-letter() that takes a list lst of strings and a non-negative (>= 0) integer n as a parameter and returns a new list containing all of the strings in Ist that have length n. If n is negative or Ist is empty the function should return an empty list. The original list should not be modified. The following shows several sample runs of the function: e://Use LTeaching/17-18 wQ/csc241W2017Hws/assign6 html 23 7/2018 Assignment 6- CSC 241-801 Python 3.6.2 Shell File Edit She Debug Options Window Help "dog,"cat''bus' >>>1st t'stop', door'] >>> 1st = nletter ( [ dog' >>>lst '1et ter' , ' stop , ' door ' , 'cat' , 'bus' , floor' ] , 5) - floor' >>> 1st - nletter ( [-dog' , >>lst Ll ' letter ' , ' stop, ' door . , ' cat ' , 'bus , ' floor], 2) - >>>n letter(lst, 3) one 1st one, 'tuo three'] >>n letter (lst, -3) Cl >>>lst ['one', tuo', 'three'1 >>>n letter,5) Ln: 56 Col: 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!