How to pass a variable in st.warning

my code is so simple

st.warning('This is a warning', icon="⚠️")

but i have a variable like s = 10 i want pass this variable to warning and the result should be like this
:warning: 10 this is a warning

how is possible to do it?

thanks in advance

f-string does not work?

s = 10
st.warning(f'{s} This is a warning', icon="⚠️")

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