Sequences and Tuples
Learn about sequences and tuples.
We'll cover the following
When working with sets, we might need to list the elements of a set in some order. This process is called enumerating a set. Because enumeration also applies to infinite sets, the ordering of the elements of an infinite set is typically defined as a function from the set of nonnegative integers to the elements of the set under consideration.
What is a sequence?
A sequence is an ordered list of elements that can be finite or infinite. The order of the elements is normally maintained by indexing them by the set of nonnegative integers, although other indexing sets can also be used. More formally, a sequence can be viewed as a function from nonnegative integers to a set
Let’s look at a few examples to further comprehend the concept of sequences.
Examples
Let’s consider the sequence
Get hands-on with 1400+ tech skills courses.