The Python Code block relies on the Pyodide project. It allows us to run Python Code directly in the browser.
Next, we use two Text Editor (JSON content) blocks to allow the visitors to provide two variables.
We are using the “+” operator between the content of the two blocks above.
The Python block can run on demand (press Run), automatically, and one can even hide it.
Moreover, we can make it editable, so the users can change it.
And below we display the result in a Text Viewer block.
Feel free to experiment, e.g. change the variables to numbers or arrays.
For more details please see the corresponding documentation.