This error frustrates me when I want to iterate over the elements of a set, for example when trying to convert the set to a list. How do I get around it?
farmwife
0
Light Poster
Recommended Answers
Jump to PostYou do not get this error when you iterate over the elements of a set.
elements={1,2,3} for each in elements: print each
You do not get this error when you convert a set to a list.
listelements=list(elements)
You do get this error, when you try …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.