Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

We will explore four fundamental data structures available in Python: lists, tuples, dictionaries, and sets. Understanding these data structures is essential for effective data management and manipulation in Python programming.

1. Lists

Lists are ordered collections that can hold multiple items of various types. They are mutable, meaning you can change their contents after they are created.

Features

  • Ordered: Items have a defined order and maintain that order.
  • Mutable: You can add, remove, or modify items.
  • Indexed: Items are accessed by their index, starting from 0.

2. Tuples

Tuples are ordered collections similar to lists but are immutable, which means once they are created, their contents cannot be changed.

Features

  • Ordered: Items have a defined order.
  • Immutable:We cannot add, modify, or remove items after creation.
  • Indexed: Items are accessed by their index, starting from 0.

3. Dictionaries

Dictionaries are unordered collections of key-value pairs. Each key is unique and is used to access the corresponding value.

Features

  • Unordered: Items do not maintain a specific order.
  • Mutable: You can add, modify, or remove key-value pairs.
  • Key-Value Pair: Each item consists of a key and a corresponding value.

4. Sets

Sets are unordered collections of unique elements. They are useful for operations such as membership testing, eliminating duplicates, and performing set operations.

Features

  • Unordered: Items do not maintain any specific order.
  • Mutable: You can add or remove items, but items must be unique.
  • Unique Elements: Duplicate elements are automatically removed.