What will be the value of ‘result’ in following Python program?list1 = [1,2,3,4] list2 = [2,4,5,6] list3 = [2,6,7,8] result = list() result.extend(i for i in list1 if i not in (list2 list3) and i not in result) result.extend(i for i in list2 if i not in (list1 list3) and i not in result) result.extend(i for i in list3 if i not in (list1 list2) and i not in result) - Study24x7
Social learning Network
03 Feb 2024 10:56 AM study24x7 study24x7

What will be the value of ‘result’ in following Python program?

list1 = [1,2,3,4] list2 = [2,4,5,6] list3 = [2,6,7,8] result = list() result.extend(i for i in list1 if i not in (list2+list3) and i not in result) result.extend(i for i in list2 if i not in (list1+list3) ...

See more

A

[1, 3, 5, 7, 8]

B

 [1, 7, 8]

C

 [1, 2, 4, 7, 8]

D

error

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles