---
title: "Numbers from text: cheat sheet"
subtitle: "Console bridge: text in, text out"
---

# Numbers from text

> The commands and patterns from this unit. In the tutorial, open **Reference** in any playground to copy them.

:::keep-together

**if / else**: Do one thing or the other, depending on a condition.

```python
if x > 0:
    pass
else:
    pass
```

:::

:::keep-together

**int**: Turn text made of digits, such as "12", into a whole number you can calculate with.

```python
int(text)
```

:::
