Sequences

  • an ordered collection of values.

    • strings - a sequence of chars

    • lists - a sequence of values of any type

Characteristics:

  • finite length

  • each element has a discrete integer index

Behaviors:

  • retrieve an element at a particular position

  • create a copy of a subsequence

  • check for membership

  • concatenate 2 sequences together

Example:

For - range:

  • creates a sequence containing values within a specified range - range (start, end, skip)

Last updated