I recently encountered a scenario in which if a set only contained a single element, I wanted to do something with that element. To get the element, I settled on this appro
There is also Extended Iterable Unpacking which will work on a singleton set or a mulit-element set
element, *_ = myset
Though some bristle at the use of a throwaway variable.