SyntaxFix
Write A Post
Hire A Developer
Questions
Two options that don't require copying the whole set:
for e in s: break # e is now an element from s
Or...
e = next(iter(s))
But in general, sets don't support indexing or slicing.