Feb. 2, 2024, 1:23 p.m. | Irene Njuguna

DEV Community dev.to




Introduction


Tuples is a datatype in Python, it provides a way to store multiple items within a single variable. This article explores tuples, comparing them with other data types like lists, sets, and dictionaries, showing their unique features.


What is a tuple?


A tuple is an ordered and unchangeable collection written with round brackets.



Example of a tuple:



my_tuple = ("Kiwi", "orange", "mango")



Basic Tuple Properties


Ordered: Tuples maintain a defined order of items.

Unchangeable: Once created, tuples …

article beginner beginners collection data features guide introduction lists multiple python store them tuples types webdev

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US