Built-in Functions
Why Built-in Functions Matter
Every single program you write already uses them — print(), type(), len(), and the one that confused you yesterday: isinstance().
You thought isinstance was something you (or someone else) defined with def.
It’s not.
Built-in functions are tools Python gives you for free the moment you start Python. You never need to write them yourself. They are always there, like a hammer and screwdriver in a brand-new toolbox.
Python 3.12 officially gives you 71 of these tools (functions + common types). This page is your complete beginner-friendly guide.
The Most Useful Built-ins (Start Here)
These 15 are the ones you will use in 90% of your early programs. Learn them first.
Talking to the Screen – print()
The most famous built-in. It displays anything on the screen.
Getting Answers from the User – input()
Asks the user to type something.
Finding Out the Type – type()
Tells you what kind of data you have.
The One That Confused You – isinstance()
Checks if something is a certain type (exactly what we used in the age example).
Changing Types – int(), str(), float(), bool()
Convert one type to another.
Counting Things – len()
Works on strings, lists, etc.
Creating Number Sequences – range()
Super useful for loops (you’ll learn loops soon).
Math Helpers
abs() • round() • min() • max() • sum()
Sorting – sorted()
Gives you a sorted version without changing the original.
How to Explore Even More Built-ins
Want to see every single one yourself? Run this tiny code anytime:
(The official Python documentation counts 71 practical built-in functions and types — the rest are mostly error types and internal helpers.)
Common Beginner Mistakes
- Thinking
isinstanceorprintneeds adef— they don’t. - Forgetting that
input()always returns a string (so you usually needint(input())). - Mixing types without converting (
"5" + 3crashes). - Using
lenon a number (len(25)→ error).
What You Have Learned
- Built-in functions are Python’s free toolbox — 71 of them.
- You never have to write
print,type,isinstance,len, etc. - The most important ones for beginners are
print,input,type,isinstance, type converters,len,range, and the math helpers. - This page is your forever cheat sheet — bookmark it!