When you need to present some code examples, a literal block can be used. Two colons are used to mark the block, which is an indented paragraph:
This is a code example
:: >>> 1 + 1 2 Let's continue our text
Don't forget to add a blank line after :: and after the block otherwise, it will not be rendered.
Notice that the colon characters can be put in a text line. In that case, they will be replaced by a single colon in various rendering formats:
This is a code example: >>> 1 + 1 2 Let's continue our text
If you don't want to keep a single colon, you can insert a space between the example and ::. In that case, :: will be interpreted and totally removed:
![](assets/c8d76b24-9d53-406b-9d76-1d21614a5fe7.png)
Figure 3: Code samples in reST rendered as HTML
We'll take a look at links in the next section