# Data Type

> The kind of value something is. A number, a bit of text, or true or false.

**Field:** Software Development  
**Category:** Programming Concepts  
**Also known as:** Type

## Think of it like

Think of it like the kind of thing in a jar. Sugar, nails and water each need their own jar.

## Definition

A data type says what kind of value something is. Whole numbers, decimals, text and true or false are the common ones. The type decides what you can do with the value. You can add two numbers, but you cannot add a number to a word without changing one first. Each language has its own names for its types.

## Example

Jack adds "5" + 5 in Python and gets an error. One is text and one is a number, so Python will not mix them.

## Example code

```python
>>> type(42)
<class 'int'>
>>> "5" + 5
TypeError: can only concatenate str (not "int") to str
```

Python knows 42 is a whole number, and refuses to add text to it.

## Why it matters

Many bugs come from a value of the wrong type. Knowing the type tells you which actions are safe.

## Common mistake

Thinking "5" and 5 are the same. One is text that looks like a number; the other is a number.

## Three principles

- **Kind of value.** Number, text and true or false differ.
- **Decides the actions.** Each type allows its own set of moves.
- **Convert on purpose.** Change a type yourself before mixing them.

## Related terms

- [String](https://learn.benibix.com/term/development/string)
- [Integer](https://learn.benibix.com/term/development/integer)
- [Boolean](https://learn.benibix.com/term/development/boolean)
- [Variable](https://learn.benibix.com/term/development/variable)
- [Floating-Point Number](https://learn.benibix.com/term/development/floating-point-number)
- [Type Conversion](https://learn.benibix.com/term/development/type-conversion)
- [Enumeration (Enum)](https://learn.benibix.com/term/development/enum)

## Taught in

- [Data Types in Python](https://learn.benibix.com/learn/development-concepts/data-types-in-python): Programming Basics, 6/18

---

Source: https://learn.benibix.com/term/development/data-type
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
