Skip to content

Commit a722480

Browse files
committed
Create display code.md
1 parent 3e9e9d0 commit a722480

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

display code.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The `st.echo()` function in Streamlit is used to display both the code and its output. In the provided example:
2+
3+
with st.echo()
4+
is a context manager that tells Streamlit to echo the code inside it.
5+
6+
st.write('Code will be executed and printed')
7+
is the code inside the `with st.echo():` block, and it will be executed and printed along with its output.

0 commit comments

Comments
 (0)