In the past years I have done a bit of programming teaching. Mostly at the university, where I have tutored in-person classes for C and LaTeX. On the side I have also taught people C and recently Python. In order to learn programming, one has to be able to experiment, therefore one needs to have a shared environment that allows to execute code. I want to introduce a few options that I have found.
The first one is JDoodle. It supports a bunch of programming languages and one can work on a single file there. It supports interactive programs but no interactive interpreter. Collaboration is possible, but I found it flaky, often one person would just drop out.
Then there is Codeshare, which is a very nice shared editor, but there is no way to execute the code. This can be nice, but it is not really what I need.
The next one is Repl.it which looks much more polished than JDoodle. It has smooth collaboration, multi-file projects and also has an interactive interpreter. This is very nice to use!
Another great tool are Jupyter Notebooks, which are cell-based notebooks that can be either Python or Markdown cells. They are web-based and inherently build for sharing and collaboration. One just needs some hoster for it, and that is a bit difficult to figure out. The best one I could find is Google Colab, which is free and also features GPUs that can be used with TensorFlow.
I find that for projects the Repl.it webseite is the best one, and for covering a single topic Google Colab is the best environment. There are various other paid services for exactly this, but already these are sufficiently well suited for the teaching that I do.