# Type Conversion

*noun*

say it: **“TYP kun-VER-zhun”** **/taɪp kənˈvɜːrʒən/**

Turning a value into another type, such as text into a number with int() or float(), or a number into text with str().

## What is **type conversion**?

**Type conversion** turns a value into another type with `int()`, `float()` or `str()`. You need it all the time, because `input()` always gives you a string.

```python
age_text = input("How old are you? ")   # e.g. "25"
age = int(age_text)
print(age + 1)  # 26
```

## In a sentence

- “**Type conversion** with str() let the program join the total into a message.”
- “input() gives text, so **type conversion** with int() was needed before adding 1.”

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

Updated: November 19, 2026

## In other subjects

- [Type Conversion in C#](https://www.ask-codey.com/glossary/type-conversion-c-sharp)
- [Type Conversion in PowerShell](https://www.ask-codey.com/glossary/type-conversion-powershell)

Source: https://www.ask-codey.com/glossary/type-conversion
