Generate a python program that takes two sets of integers as input and outputs the intersection of those sets.
set1 = {1, 2, 3, 4}
set2 = {3, 4, 5, 6}
def intersection(set1, set2): 
   return set1 & set2

result = intersection(set1, set2) 
print(result)