# Conditional Expression

say it: **“kun-DISH-un-ul ek-SPRESH-un”** **/kənˈdɪʃənəl ɪkˈsprɛʃən/**

Picks one of two values in one line: this if condition else that.

## What is a **conditional expression**?

A **conditional expression** picks one of two values in a single line: `this if condition else that`.

```python
age = 20
ticket = "adult" if age >= 18 else "child"
print(ticket)  # adult
```

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/conditional-expression
