- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for tuple (0.18 sec)
-
docs/en/docs/python-types.md
Notice that the variable `item` is one of the elements in the list `items`. And still, the editor knows it is a `str`, and provides support for that. #### Tuple and Set { #tuple-and-set } You would do the same to declare `tuple`s and `set`s: //// tab | Python 3.9+ ```Python hl_lines="1" {!> ../../docs_src/python_types/tutorial007_py39.py!} ``` //// //// tab | Python 3.8+
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 17.1K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params-str-validations.md
Did you notice? a string using `value.startswith()` can take a tuple, and it will check each value in the tuple: {* ../../docs_src/query_params_str_validations/tutorial015_an_py310.py ln[16:19] hl[17] *} #### A Random Item { #a-random-item } With `data.items()` we get an <abbr title="Something we can iterate on with a for loop, like a list, set, etc.">iterable object</abbr> with tuples containing the key and value for each dictionary item.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 17.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-nested-models.md
{* ../../docs_src/body_nested_models/tutorial002.py hl[1] *} ### Declare a `list` with a type parameter { #declare-a-list-with-a-type-parameter } To declare types that have type parameters (internal types), like `list`, `dict`, `tuple`: * If you are in a Python version lower than 3.9, import their equivalent version from the `typing` module * Pass the internal type(s) as "type parameters" using square brackets: `[` and `]` In Python 3.9 it would be:
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 7.3K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
It is equivalent to `set(["name", "description"])`. /// #### Using `list`s instead of `set`s { #using-lists-instead-of-sets } If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will still convert it to a `set` and it will work correctly: {* ../../docs_src/response_model/tutorial006_py310.py hl[29,35] *} ## Recap { #recap }
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 16K bytes - Viewed (0) -
docs/en/docs/release-notes.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Fri Sep 05 12:48:45 UTC 2025 - 544.1K bytes - Viewed (0)