### Bug description

[The authoring guide on tables](https://quarto.org/docs/authoring/tables.html#computations) provided an example producing multiple tables in R in a single code cell. However, when using Python to do so, only the last table shows in the output, with its subcaption wrongly assigned to be the first one stated in `tbl-subcap`.

Here's a minimal example, modified from the code provided in the guide mentioned above.

`````md
---
title: "Test"
---

```{python}
#| label: tbl-planet-measures
#| tbl-cap: Planets
#| tbl-subcap: 
#|   - "Planets"
#|   - "Satellites"
#| layout-ncol: 2
#| echo: false

from IPython.display import Markdown
from tabulate import tabulate
table1 = [["Earth",6371,5973.6],
          ["Mars",3390,641.85]]
table2 = [["Moon",1737,73.5]]
Markdown(tabulate(
  table1, 
  headers=["Planet","R (km)", "mass (x 10^29 kg)"]
))
Markdown(tabulate(
  table2, 
  headers=["Planet","R (km)", "mass (x 10^29 kg)"]
))
```
`````

In contrast, multiple figures work well in Python. Here's a comprehensive qmd file illustrating the issue. [index.md](https://github.com/quarto-dev/quarto-cli/files/11404725/index.md)

![snap](https://user-images.githubusercontent.com/44888975/236419685-38eaf7c3-a69f-46d1-a43e-7475c5945bf5.jpg)

Apologize if I've missed something obvious. Thanks.

---

Quarto version: 1.3.340

system: Windows 11

Quarto check:
```
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.340
      Path: C:\Program Files\Quarto\bin
      CodePage: 936

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.8.13 (Conda)
      Path: C:/Users/sun123zxy/.conda/envs/data/python.exe
      Jupyter: 4.11.1
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
```

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cderv
2023-05-05T09:28:32Z
sun123zxy
bug documentation jupyter
v1.4
open
Multiple tables produced by Python in a single code cell not showing
https://github.com/quarto-dev/quarto-cli/issues/5432