#!/usr/bin/python3
#=====================================================================================
# Python set (A set is similar to a list, except all elements must be unique)
#=====================================================================================
print("Content-Type: text/html \n")     #http header with newline char (required for web)

stuff1 = {}                                                 #create an empty set
stuff2 = {1,2,3,4,5,6,7,8,9}
stuff3 = {'Sam','John','Steve', 1, 2, 3}                    #set elements can be multiple data types

print('<pre>')                                  #to print better on the web

print('Printing empty stuff1 set ......:', stuff1)
print()

print('Printing the entire stuff2 set..:', stuff2)
print('The number of elements in stuff2:', len(stuff2))
print()

print('Printing the entire stuff3 set..:', stuff3)
stuff3.add(4)                                                       #add new element to end of set
stuff3.add('Bill')                                                  #add another element to end of set
stuff3.add('Sam')                                                   #will NOT add, since it is a duplicate value
stuff3.discard('Sam')                                               #delete element Sam
print('After add, and delete ..........:', stuff3)
print()