10. Write a python program to obtain the deviation between the list_a and list_b as given in the following output.
The output is:
list_a = [22, 52, 79, 55, 31, 90, 67, 54, 87]
list_b = [31, 52]
Expected Answer: The deviation between the list_a and list_b are: [67, 79, 54, 55, 22, 87, 90]
Sample Answer:
list_a = [22, 52, 79, 55, 31, 90, 67, 54, 87] list_b = [31, 52] print("The deviation between the list_a and list_b are: ", list(set(list_a) - set(list_b)))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)