Question

In python, there are some special variables and filenames that are surrounded by double-underscores. For example, there is the

__file__ 

variable. I am only able to get them to show up correctly inside of a code block. What do I need to enter to get double underscores in regular text without having them interpreted as an emphasis?

Was it helpful?

Solution

__file__

Put a backslash before the first underscore.

Like this:

\__file__

OTHER TIPS

You can also put a backslash before the final underscore

__file_\_

gives you

__file__

You can use _ in place of left underscores. Example: __file__

`* ` The same holds true for the star-character or any markdown syntax. Bbackticking works well.

_\_file__ enter this will help you.

Just you need to write it like this in markdown

\_\_file\_\_
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top