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
I suggest:
element = myset.pop()