Write a program to Given a two list of equal size create a set such that it shows the element from both lists in the pair


Topic: Write a program to Given a two list of equal size create a set such that it shows the element from both lists in the pair

Solution

firstList = [2, 3, 4, 5, 6, 7, 8]
secondList = [4, 9, 16, 25, 36, 49, 64]
result = zip(firstList, secondList)
resultSet = set(result)
print(resultSet)



List all Python Programs