I\'m learning python, and I have a novice question about initializing sets. Through testing, I\'ve discovered that a set can be initialized like so:
my_set
Compare also the difference between {} and set() with a single word argument.
{}
set()
>>> a = set('aardvark') >>> a {'d', 'v', 'a', 'r', 'k'} >>> b = {'aardvark'} >>> b {'aardvark'}
but both a and b are sets of course.
a
b