Update the set, adding any elements from other which are not already in the set. *other*, the collection of items with which to update the set, which may be any iterable type.
(self, other)
| 234 | return self |
| 235 | |
| 236 | def update(self, other): |
| 237 | """Update the set, adding any elements from other which are not |
| 238 | already in the set. |
| 239 | |
| 240 | *other*, the collection of items with which to update the set, which |
| 241 | may be any iterable type. |
| 242 | """ |
| 243 | |
| 244 | for item in other: |
| 245 | self.add(item) |
| 246 | |
| 247 | def clear(self): |
| 248 | """Make the set empty.""" |