Learning Scientific Programming with Python (2nd edition)

Q4.2.3: Defining set objects

Question Q4.2.3

Predict and explain the effect of the following statements:

>>> set('hellohellohello')
>>> set(['hellohellohello'])
>>> set(('hellohellohello'))
>>> set(('hellohellohello',))
>>> set(('hello', 'hello', 'hello'))
>>> set(('hello', ('hello', 'hello')))
>>> set(('hello', ['hello', 'hello']))