Question: ```
y = [1, 3, 2, 4]
x = y.sort()
print(x)

```

x is `None`. How come this sort of syntax works in, for example, Javascript, and not Python?

Answer: 
`sort` (and `reverse`) change the list in-place.

If you want, you can use `sorted`:

```py
x = sorted(y)

```

This is explained in the section [Data Structures](https://docs.python.org/3/tutorial/datastructures.html) in the documentation.
Here, `y.sort()` sorts y and can't be assigned to another variable.Here, you could use `sorted()` like `x = sorted(y)` or:

```
x = [i for i in sorted(y)]

```

Or lets use a beautiful one-liner:

```
x = [y.pop(y.index(min(y))) for i in range(len(y))]

```