how to add elements to an empty set in python code example Example: creating empty set and append python myset = set() myset.add('a')