From 6a5b10648ec5b127a5346848f93066ec4a94a15a Mon Sep 17 00:00:00 2001 From: Rafael de Almeida Date: Fri, 11 Jun 2021 23:30:08 -0300 Subject: [PATCH] Update 30-tuples.md Congratulations and thanks for the material, very good! I'm using some part of it to prepare a material for Brazilian students. I made a suggestion (I don't know if it's valid) of a small addition best --- .../080-advanced-datatypes/30-tuples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/02-introduction-to-python/080-advanced-datatypes/30-tuples.md b/website/content/02-introduction-to-python/080-advanced-datatypes/30-tuples.md index 405dd71..d8658d3 100644 --- a/website/content/02-introduction-to-python/080-advanced-datatypes/30-tuples.md +++ b/website/content/02-introduction-to-python/080-advanced-datatypes/30-tuples.md @@ -17,7 +17,7 @@ You might ask, why tuples when Python already has lists? Tuples are different in | creation | `()` or `tuple()` for empty tuple. `(1, )` for one item, or `(1, 2, 3)` for a tuple with items. | | search methods | `my_tuple.index(item)` or `item in my_tuple` | | search speed | Searching for an item in a large tuple is slow. Each item must be checked. | -| common methods | Can't add or remove from tuples. | +| common methods | Can't add or remove from tuples. So `my_tuple.count(item)` count of item and `my_tuple.index(item)` are the only methods | | order preserved? | Yes. Items can be accessed by index. | | mutable? | **No** | | in-place sortable? | **No** |