a_set = {1, 2, 'a', 'a', 2}
print('create a non-empty set:')
print(a_set)
a_set = set()
print('create a empty set:')
print(a_set)
str_1 = 'dogs chase cats'
str_2 = 'dogs hate cats'
str_1_words = set(str_1.split())
str_2_words = set(str_2.split())
try:
str_1_words[1]
except:
print("Don't support index")
try:
str_1_words[1:]
except:
print("Don't support slice")
len_str_1_words = len(str_1_words)
len_str_2_words = len(str_2_words)
print(len_str_1_words, len_str_2_words)
print(str_1_words.intersection(str_2_words))
print(str_1_words & str_2_words)
print(str_1_words.union(str_2_words))
print(str_1_words | str_2_words)
print(str_1_words.difference(str_2_words))
print(str_1_words - str_2_words)
print(str_1_words.symmetric_difference(str_2_words))
print(str_1_words ^ str_2_words)