Tuples
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets.
Creating a tuple is as simple as putting different comma-separated values. Optionally you can put these comma-separated values between parentheses also.
You can not modify, cannot remove can not add anything.
for example:
Here you won't see append, pop or clear options, you can NOT modify tuples.., you can only use count and index.
it won't allow modification. It's good when you don't want anybody to modify it
Tuples
Reviewed by ohhhvictor
on
May 07, 2019
Rating:
No comments: