Question: (In python) Assume that L1 and L2 are two non-empty lists. Write function that takes as input these two lists and returns a list of

(In python) Assume that L1 and L2 are two non-empty lists. Write function that takes as input these two lists and returns a list of all elements from both lists (without duplicates). Note, those duplicates could reside in the same list. For example, if L1 = [1,2,3,2,1] and L2 = [3,3,1,5,4], then the program should return [1,2,3,4,5], not necessarily in that order. b) Write a one-line list comprehension that takes the alphabetic string Str (i.e. that only has alphabetic characters in it) and returns a list of each non-vowel character of the given string duplicated four times. For example, if Str = "popular", then the list comprehension would be [pppp, pppp, llll, rrrr].

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!