Tuples - CBSE Class 11 Computer Science Notes, Diagrams and Solved Questions
Fixed, unchangeable sequences in Python: creating tuples (and the one-item comma), indexing, joining and repeating, index, sorted, min, max and sum, tuple assignment and swapping, nested tuples and the suggested programs.
In this chapter
What a tuple is and why it is immutable
The one-item tuple and the comma rule
Indexing, slicing, concatenation, repetition and membership
len, index, sorted, min, max and sum on tuples
Tuple assignment: packing, unpacking and swapping
Nested tuples, and lists inside tuples
Min, max, mean, linear search and frequency programs