---
title: Built-in Functions in Python
source: https://app.sythra.ai/learn/python/built-in-functions-python
topic: Python
updated: 2026-08-12
publisher: Sythra (https://app.sythra.ai)
---

# Built-in Functions in Python

Built-in functions in Python are functions always available without any import, like type(), len(), range(), round(), max(), min(), and sum() — they cover type checking, numbers, and generating sequences.

_Source: [https://app.sythra.ai/learn/python/built-in-functions-python](https://app.sythra.ai/learn/python/built-in-functions-python) — free to read on Sythra._

## Key points

- Built-in functions never need an import statement, unlike math or random
- type() tells you the exact type; isinstance() asks a yes/no question about type
- round() rounds to the nearest value; int() truncates instead
- len() measures strings, lists, and other collections
- range() generates a sequence that stops one before its end value

Some tools are so commonly needed that Python does not make you import anything — they are always available the moment you start Python. These are called **built-in functions in Python**. Unlike [modules like math and random](/learn/python/libraries-and-modules-python), you never write an `import` line to use them.

This page rounds up the built-ins you'll use constantly: checking and converting types, working with numbers, measuring things, and generating sequences.

## What you will learn

- How `type()` and `isinstance()` differ
- Converting between types with `int()`, `float()`, `str()`
- Number built-ins: `abs()`, `round()`, `pow()`, `max()`, `min()`, `sum()`
- Measuring things with `len()`
- Generating sequences of numbers with `range()`

## Checking and converting types

```python
type(42)             # <class 'int'>     tells you what type something is
type(3.14)           # <class 'float'>
type('hello')        # <class 'str'>

isinstance(42, int)          # True    is 42 an integer? yes
isinstance(3.14, int)        # False   is 3.14 an integer? no
isinstance('hello', str)     # True    is 'hello' a string? yes
```

`type()` tells you what kind of thing something is. `isinstance()` asks a yes-or-no question — _is this thing a particular type?_ — which makes it handy for guarding functions against bad input, as covered in [Recursion in Python](/learn/python/recursion-in-python).

You can also convert between types (full details in [Type Casting in Python](/learn/python/type-casting)):

```python
int(3.9)       # 3         cuts off the decimal (does NOT round)
float(5)       # 5.0       turns a whole number into a decimal
str(42)        # '42'      turns a number into text
```

These are useful when, for example, you want to join a number into a sentence — Python will not let you stick a number and a string together directly, but if you convert the number to a string first, it works fine.

## Numbers

```python
abs(-7)            # 7       the absolute value (removes the minus sign)
round(3.7)          # 4       rounds to nearest whole number
round(3.14159, 2)   # 3.14    rounds to 2 decimal places
pow(2, 8)           # 256     2 to the power of 8
max(3, 7, 2)        # 7       the largest value
min(3, 7, 2)        # 2       the smallest value
sum([1, 2, 3, 4])   # 10      adds everything in a list
```

`round()` is the one to reach for when you actually want rounding behavior — unlike `int()`, which always truncates toward zero regardless of how close a value is to the next whole number.

## Measuring things: len()

```python
len('hello')         # 5    how many characters in a string
len([10, 20, 30])    # 3    how many items in a list
```

`len()` is one of the most used functions in Python — it works on strings, lists, and many other collection types.

## Generating sequences of numbers: range()

```python
range(5)          # 0, 1, 2, 3, 4
range(1, 6)       # 1, 2, 3, 4, 5
range(0, 10, 2)   # 0, 2, 4, 6, 8  (step of 2)
```

`range()` gives you a sequence of numbers. You will use this constantly in loops — for example, `for i in range(5)` repeats something five times. The sequence always stops _before_ the last number you give it — `range(5)` never includes `5` itself.

> **Worth knowing:** 

## Common mistakes

- Comparing a boolean result with `== True` instead of using it directly
- Expecting `int()` to round like `round()` does — it truncates instead
- Assuming `range(5)` includes `5` — it stops one before the end value
- Calling `len()` on something that has no length, like an integer, and hitting a `TypeError`
- Confusing `type()`, which tells you the exact type, with `isinstance()`, which answers a yes/no question

> **Practice with Sythra:**  [Practice with AI tutor](https://app.sythra.ai/pricing)

## FAQ

### What are built-in functions in Python?

Built-in functions are functions that are always available in Python without needing to import anything, such as type(), len(), range(), print(), max(), min(), and round().

### What is the difference between type() and isinstance()?

type() returns the exact type of a value, like . isinstance() answers a yes/no question about whether a value is a specific type, returning True or False, and is the preferred way to check types in conditionals.

### Does round() work the same as int() in Python?

No. round() rounds to the nearest whole number (or a given number of decimal places), while int() truncates — it simply chops off the decimal part regardless of how close it is to rounding up.

### Does range(5) include the number 5?

No. range(5) produces 0, 1, 2, 3, 4 — it always stops one before the value you give it as the end.

### What does len() do in Python?

len() returns the number of items in a sequence, such as the number of characters in a string or the number of elements in a list.

## Related

- [Functions in Python: Definition and How They Work](https://app.sythra.ai/learn/python/functions-in-python) — How def, parameters, and return values work.
- [Libraries and Modules in Python](https://app.sythra.ai/learn/python/libraries-and-modules-python) — Functions that do need an import, like math and random.
- [Type Casting in Python](https://app.sythra.ai/learn/python/type-casting) — The int(), float(), and str() conversion functions in depth.
- [Python course hub](https://app.sythra.ai/learn/python) — All free Python explainers and the path into Agentic practice.
- [Functions in Python in Depth: The Complete Guide](https://app.sythra.ai/learn/python/python-functions-in-depth) — Default args, *args/**kwargs, lambdas, and scope — all in one.

---

Written by Sythra — Learn machine learning by building. Practice this topic with Sythra's AI tutor: https://app.sythra.ai/pricing
