Tuple:
- The tuple data type is used to store the collection of items in unordered and it allows duplicate values same as a list.
- These items are immutable, that means cannot be changed tuple.
- It is denoted by parentheses () but if calling the index value means using square brackets [].
- Its index value is started with 0 and end with list_length-1.
Syntax:
Example program for print tuple elements:
No comments:
Post a Comment