Skip to content

Commit 374fcce

Browse files
Consitent Hello world example for Playground
1 parent aae3137 commit 374fcce

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/get-started/installation/streamlit-playground.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,23 @@ Because the Playground runs Streamlit _locally_ in your browser, you should visi
4141
```python
4242
import streamlit as st
4343

44-
st.title("Hello World")
44+
st.write("Hello World")
4545
```
4646

4747
A second or two after typing or pasting the code into the editor, the right panel will display the updated app. The code editor saves your edits whenever you pause from typing. Therefore, if you pause between keystrokes as you type a new line of code, you may see an error on the right because Streamlit executed an incomplete line. If this happens, just keep typing to complete the line(s) you are writing. When you pause again at the end of the line, Streamlit reruns the app.
4848

49+
1. On the left, change `st.write` to `st.title` so the code editor has the following code:
50+
51+
```python
52+
import streamlit as st
53+
54+
st.title("Hello World")
55+
```
56+
57+
A second after you stop typing, Streamlit reruns the app and updates the display on the right.
58+
59+
1. Keep making changes! Watch as your edits are automatically saved and the new result is displayed on the right.
60+
4961
## What's next?
5062

5163
Read about our [Basic concepts](/get-started/fundamentals/main-concepts) and try out more commands in your app.

0 commit comments

Comments
 (0)