CodeNewbie Community 🌱

Cover image for LET TALK ABOUT #TUPLE IN PYTHON
Emmanuel Ikechukwu Okenwa
Emmanuel Ikechukwu Okenwa

Posted on

LET TALK ABOUT #TUPLE IN PYTHON

  • Tuples in Python

A Tuple is a collection of Python objects separated by commas. In someways a tuple is similar to a list in terms of indexing, nested objects and repetition but a tuple is immutable unlike lists which are mutable.

OR

Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Set, and Dictionary, all with different qualities and usage. A tuple is a collection which is ordered and unchangeable.

Below are 6 different example on TUPLE

python #pythonprogramming #pythondeveloper

pythonlearning #pythonprogramminglanguage

pythoncoding #python3

Image description

Image description

Image description

Image description

Image description

Image description

Latest comments (2)

Collapse
 
jacobvarney profile image
jacobvarney

Thanks Emmanuel! Have you had any experiences where a tuple is better to use than a list?

Collapse
 
sonofmary profile image
Emmanuel Ikechukwu Okenwa

Yes... I have