SyntaxFix
Write A Post
Hire A Developer
Questions
You can add elements of a list to a set like this:
list
set
>>> foo = set(range(0, 4)) >>> foo set([0, 1, 2, 3]) >>> foo.update(range(2, 6)) >>> foo set([0, 1, 2, 3, 4, 5])