Python List Intersection and their Addition || List || Python
In this we are going to see a basic program about List Intersection and their Addition in Python Programming Language.

list1 = [1, 2, 4, 5, 7, 8]
list2 = [7, 6, 5, 4, 3, 2]
print("List 1 : ", list1)
print("List 2 : ", list2)
print("---------------------------------------------------------------")
list3 = list1 + list2
print("Addition Of List 1 And List 2 : ", list3)
diff1 = list(set(list1) - set(list2))
diff2 = list(set(list2) - set(list1))
total_diff = diff1 + diff2
print("The Difference/Intersection Is : ", total_diff)

# Coded By DHIRAJ SHELKE

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post