Why I see the comments in the py file in the browser where I display the results?

Why do I see the comments in the py file in the browser where I display the results?

Hi @abashelra, welcome to the Streamlit community!

Can you be more specific? What code are you running, what does it look like on your screen, and so on…

Thanks for the reply. I am running a python program (name.py) & display the results (graphs & text) on the chrome explorer according to your explanations. (address http://localhost:8501/). in addition to the results I see on the chrome the comments that are between ‘’’…’’’ but not the comments that start with # can I do something to avoid displaying akso the comments between “”"…""""?

Values between " or ' are not comments in Python, but rather string values. In Streamlit, when you place an object by itself on its own line the value gets printed.

As you’ve seen, # are for making comments in your code.

So how do I make a whole section a comment w/o the need to put # in from of every line?

You don’t, that’s not part of the Python language specification.

In the following https://www.geeksforgeeks.org/comments-in-python/ there is an explanation on how to make a multiline comments. ?!

This article explains it better:

Writing “multiline comments” like that is just creating a string that doesn’t get used in your code. However, in Streamlit, we’ve modified that behavior so that you can make text get displayed in the app. Regardless of whether you are using Streamlit or not, I wouldn’t take that advice in doing multi-line comments that way. Most common text editors such as VSCode or Atom, Jupyter Notebook, PyCharm all have functionality where you can highlight multiple lines and comment them out with a single keystroke, which adds # to the front of the lines.