Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c. Write a python function my_trim(inputlist) that will take one input, a list with an arbitrary length it will return a list which comprises the
c. Write a python function my_trim(inputlist) that will take one input, a list with an arbitrary length it will return a list which comprises the prime numbered indexed elements of the input list print(my_trim([a,2,b,4])) will print [b,4] because 2 and 3 are prime numbers, list[2] and list[3] are b and 4. Please remember that in python the indexes start from 0 in a list. output this:
print(my_trim([10,11,12,13,14,15,16,17,18]))
print(my_trim([a,b,c,d,e,f,g,h,I]))
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