diff --git a/07.Tuple.md b/07.Tuple.md index 5ecf528..80d8eca 100644 --- a/07.Tuple.md +++ b/07.Tuple.md @@ -1,6 +1,6 @@ # Lesson 7: Data Structures p.2 (`tuple`) -> Tuples are the static snapshots of data, providing a reliable and immutable record of information in code." +> "Tuples are the static snapshots of data, providing a reliable and immutable record of information in code." ## Content @@ -12,7 +12,7 @@ ## 1. Overview of Tuples -In `Python` a `tuple` - is an _immutable, ordered sequence of items_. +In `Python` a `tuple` is an _immutable, ordered sequence of items_. Similar to `lists`, `tuples` can contain elements of different data types, but _**cannot**_ be modified after their creation. @@ -124,11 +124,11 @@ ID after: 139653455025920 Yes, it's `Python` baby, but I promise, you will get used to this once understand the concept of objects and how do they work. -Note that `id` of the `tuple` hasn't changed, but `id` of the objects inside has. +Note that `id` of the `tuple` hasn't changed, but the content of the objects inside has. ## 2. Features Overview -Same as lists `Python` supports `indexing`, `slicing`, `concatenation`, `multiplication`, `unpacking` and some `built-in` functions. +Same as lists, `Python` tuples support `indexing`, `slicing`, `concatenation`, `multiplication`, `unpacking` and some `built-in` functions. Suppose we have the following two tuples: @@ -249,7 +249,7 @@ nums = (1, 2, 3) ## 3. Iterations -Typically we use tuples for stroing the _constants_. +Typically we use tuples for storing _constants_. ### 3.1 Using `for in` @@ -296,7 +296,7 @@ Prime number at index 4 is 11 There is a built-in function called `enumerate()`, that adds a counter to an iterable. -It can be used with any iterable. and be particulary useful with when both the element and its index are needed. +It can be used with any iterable and be particulary useful when both the element and its index are needed. ```python # Tuple of weekdays