I created a web app that allows you to write and run Python code in the browser.
The app consists of three resizable text areas. The first is for writing Python code, the second is the program's input, and the last is for the program's output. The input and output areas both have a button to clear their contents.
When the code is executed the input text is passed in as stdin. There are a couple of ways to read stdin in Python, and this is often how you would get user input in a commandline Python program. I have also used stdin for reading inputs when completing programming challenges on sites like Advent of Code.
I hope people find it useful for writing small Python programs, and running Python code in the browser on devices where installing Python is not possible.
How it was built
I have a tutorial on how to use Pyodide here.