Sequence objects (lists and tuples) have the following common operations. Note: s and t are sequences of the same type; n, i, j, and k are integer values, and x is an object that meets the restrictions required by s:
- x in s: This returns true if an item in sequence s is equal to x; otherwise, it returns false
- x not in s: This returns true if no item in sequence s is equal to x; otherwise, it returns false
- s + t: This concatenates sequence s with sequence t (concatenating immutable sequences creates a new object)
- s * n: This adds s to itself n times (items in the sequence are not copied, but referenced multiple times)
- s[i]: This retrieves the ith item in sequence s, with count starting from 0 (negative numbers start counting ...