Welcome to my blog!

Welcome

List comprehension

Old way

1
2
3
4
5
numbers = [1, 2, 3, 4, 5]
even_numbers = []
for number in numbers:
if number % 2 == 0:
even_numbers.append(number)

New way

1
even_numbers = [number for number in numbers if number % 2 == 0]

header 1

Header 2

1
## Header 2
  • list 1
  • list 2
1
2
- list 1
- list 2
  1. list 1
  2. list 2
1
2
1. list 1
2. list 2

bold

1
**bold**

italic

1
*italic*

quote

1
> quote

code

1
`code`

multiline code

  • use 3 backticks to start and end a code block
1
2
3
4

def hello():
print("hello world")

1
2
3
4
5
\begin{aligned}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{aligned}

x˙=σ(yx)y˙=ρxyxzz˙=βz+xy\begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z + xy \end{aligned}