Question: create a list variable of at least 1 0 string type items and map it to a function that determines the length of each string.
create a list variable of at least string type items and map it to a function that determines the length of each string.
Details:
Create a function that accepts a string parameter and returns a list including the string parameter and the length of that string
Output myword
Create a list of strings that is at least ten strings long
List word "word "word
Use the map function to map the list of strings to the function and convert it to a list of lists
Output mywordword
Output the length of each string
Output
You can just use a for loop to output this information
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
