---
# System prepended metadata

title: My Week 8 @ Blockfuce Labs Still Learning Python

---

# My Week 8 @ Blockfuce Labs Still Learning Python
This week in Python class, we focused on two important data structures — Tuples and Dictionaries — and we also explored the concept of By Reference and By Value, which explains how Python handles data stored in variables.
### Tuples
A tuple is a collection in Python used to store multiple items in a single variable. Unlike lists, tuples are immutable, which means that after a tuple is created, its contents cannot be changed — no adding, removing, or modifying items.

Example:
![image](https://hackmd.io/_uploads/SJEl6Siwge.png)

**When do we use Tuples?**
Tuples are useful when we want to store fixed data that should never be modified — for example, days of the week, coordinates, or product specifications.

### Dictionaries
A dictionary is another powerful data structure in Python that stores information in key–value pairs.

The key is like a label (e.g., "name")

The value is the information connected to that label (e.g., "Alice")

Dictionaries are mutable, meaning we can add, change, or remove items after creation.

Example:
![image](https://hackmd.io/_uploads/r1kK6Sjvge.png)

**Why are Dictionaries important?**
They allow us to organize and retrieve data easily using meaningful keys instead of index numbers.

**By Reference and By Value**
This is an important concept that explains how Python handles variables when we assign one to another.

**By Reference**
When you assign one mutable object (like a dictionary) to another variable, both variables point to the same memory location.

Changing one will also change the other.

Example:
![image](https://hackmd.io/_uploads/BybW0BsPlg.png)
*Both dict_a and dict_b changed because they share the same reference.*

**By Value (Copy)**
If you want a separate copy of the data, you must explicitly create a copy.

Changes in the new variable will not affect the original.

Example:
![image](https://hackmd.io/_uploads/HJwlJLovgx.png)
Only dict_y changed because it is an independent copy.

### Conclusion
This week’s lesson taught me how to work with two important Python data structures:

Tuples (for storing fixed, unchangeable data)

Dictionaries (for storing labeled, editable information)

I also learned the difference between By Reference and By Value, which is essential for understanding how Python handles data. Knowing this helps avoid mistakes when copying or modifying objects in programs.

Stay tuned for more weekly updates from my time at Blockfuse Lab, Jos!
**#BlockfuseCohortIII #Web2 #SoftwareEngineeringJourney**


