Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the function elementLengthIsIndex(l1) that takes in a list of strings called l1, and returns another list of strings that contains each element of the
Write the function elementLengthIsIndex(l1) that takes in a list of strings called l1, and returns another list of strings that contains each element of the original list where the length of the element matches its index within l1.
Sample Input Sample Output
l1 = [Im, a, tricky, one] [a, one]
l1 = [, cyan, gold, red, blue] [, red, blue]
l1 = [0, 1, 22, 333, 4] [1, 22, 333]
Python Answer only because I am currently a student in this class!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started