September 2026
1051 pages
35h 4m
English
The following operations are defined for all sequential data types (s and t are instances of the same sequential data type; i, j, k, and n are integers; and x is a reference to an instance; see Table 12.2).
|
Notation |
Description |
Section |
|---|---|---|
|
x in s |
Checks whether x is contained in s. The result is a truth value. |
|
|
x not in s |
Checks if x is not contained in s. The result is a bool instance. Equivalent to not x in s. |
|
|
s + t |
The result is a new sequence containing the concatenation of s and t. |
|
|
s += t |
Creates the concatenation of s and t and assigns it to s. |
|
|
s * n or n * s |
Returns a new sequence ... |
Read now
Unlock full access