You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...print("Index is: "+str(index) +", value is: "+str(item) +".")
161
-
157
+
...print("Index is: "+str(index) +", value is: "+str(item) +".")
162
158
...
163
159
Index is: 0, value is: Alyssa.
164
160
Index is: 1, value is: grade 3.
@@ -172,9 +168,7 @@ Index is: 3, value is: 8.
172
168
Tuples are often used as _records_ containing data that is _organizationally_ or _conceptually_ homogeneous and treated as a single unit of information -- even if individual elements are of _heterogeneous_ data types.
Tuples are also used when homogeneous immutable sequences of data are needed for [`hashability`][hashability], storage in a `set`, or creation of keys in a dictionary.
@@ -183,29 +177,27 @@ Note that while `tuples` are in most cases _immutable_, because they can contain
183
177
Using a mutable data type within a `tuple` will make the enclosing `tuple`**un-hashable**.
Copy file name to clipboardExpand all lines: exercises/concept/tisbury-treasure-hunt/.docs/hints.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
## General
4
4
5
5
6
-
-[Tuples][tuples] are immutable [sequence Types][sequence types] that can contain any data type.
6
+
-[Tuples][tuples] are immutable [sequence types][sequence types] that can contain any data type.
7
7
- Tuples are [iterable][iterable]. If you need indexes as well as values, use [`enumerate()`][enumerate]
8
8
- Elements within tuples can be accessed via [bracket notation][bracket notation], using a zero-based index from the left, or -1 from the right. Other [Common Sequence Operations][common sequence operations] can also be used when working with tuples.
9
9
@@ -32,7 +32,7 @@
32
32
- Remember: tuples are _immutable_, but the contents can be accessed via _index_ using _bracket notation_.
33
33
- Tuples don't have to use parentheses unless there is _ambiguity_.
34
34
- Python has multiple methods of string formatting. [`str.format()`][str.format] and [`f-strings`][f-strings] are two very common ones.
35
-
- There are multiple textual formatting options available via Pythons[`format specification mini-language`][format specification mini-language].
35
+
- There are multiple textual formatting options available via Python's[`format specification mini-language`][format specification mini-language].
0 commit comments