1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# Python examples
A Python example using the normal MD way of specifying a language:
```python
assert 1 + 1 == 2
```
A Python example using a MyST role:
```{code-block} python
assert 1 + 1 == 2
```
Here's one way we could do invisible code blocks:
% invisible-code-block: python
%
% b = 4
%
% # ...etc...
Here's another way we might be able to do them:
<!--- invisible-code-block: python
def foo():
return 42
meaning_of_life = 42
assert foo() == meaning_of_life
--->
This is an <!-- inline comment -->.
What about a bullet?
- Bullet 1
```python
raise Exception('boom!')
```
- Bullet 2:
% skip: next
<!--- invisible-code-block: python
blank line above ^^
blank line below:
--->
|