How to decrease the spacing between paragraphs?

Hi all,

I want to write some phrases in 3 paragraphs, and the only way that I found was to create 3 st.write - see below.

st.write(‘Hello!!’)
st.write(‘This is a cheat sheet built with the most common charts that I use in the data analysis for the projects.’)
st.write(‘The idea is to have a quick and useful sheet where anyone can copy and past the code (1 line command usually) to generate the charts below.’)

My question is, is there a way to write more than one paragraph in a single st.write?
If not, how to decrease the spacing between paragraphs when I use more than one st.write?

Thank you.

You could use st.markdown instead.
There you can also use html tags for example <br> inside markdown.
This should also work with blank lines:

st.markdown("""Hello

This is a cheat sheet built with the most common charts that I use in the data analysis for the projects.

The idea is to have a quick and useful sheet where anyone can copy and past the code (1 line command usually) to generate the charts below.
""")

Thank you @Franky1 !!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.