Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Sets are collections that hold only distinct values; a set guarantees that an item will not be added more than once. They are particularly useful in scientific applications but often provide a more sensible structure than lists for holding data when duplicate values are not needed. More often than not when a list is used, a set is probably what is intended.
This chapter discusses the following topics: