# Not sure what is empty in the question. If it is referring to empty set, here is code to test for empty set set1 = {} if not set1: #... Do Something