Py-repl tag issue

I appreciate providing your greate framework !
I’m gonna write an e-book about pyscript.

In the testing tag,
I found that only last one is written,
below this script code.
for i, j in enumerate(‘abcde’):
print(i, ‘-’, j)

< output >

< test url >

when it’ll be fixed,
this framework will be grown one step.
I believe you could fix this!

if you pleaseant,
would you like to solve this issue for your time?
thank you!

As of PyScript 2022.09.1 that released on Friday, print() is sent to the Developer console by default instead of to the screen. So if you’re linking to that’s what you’ll see today:

The fact that you see the last printed thing, e, is a byproduct of the fact that by default, the Pyodide function that’s used under hood to evaluate the Python code returns the value of the last expression in the source code which is then output to the screen.

You might notice that there’s one line in the Developer Console per argument to print(), as apposed to one per line like you might expect. This is a known issue - in short, there’s one line in the console per write to stdout, and print() sends each of its arguments to stdout separately.

Thank you!
I got it.
I found another way in your providing link.
below script can print all data.
import js.jQuery as jp
output = Element(‘output’)
for i, j in enumerate(‘abcde’):
output.element.append(str(i) + ‘-’ + j + ', ')

god bless you!