Question: 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

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

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!