Skip to content
BENIBIX Learn

Built-in Function

Development🧩 Programming ConceptsFunctions

Also known as Builtin Function, Built-ins, Built-in Functions

A function that comes with the language. You can use it with no import.

Think of it like

It is like the tools that come with a new bike. You can use them at once, with nothing to buy.

Example

Lucy wants to count the letters in a name. She uses Python's len() and gets 5 for "Hello".

Why it matters

Knowing the built-ins saves you from writing code that is already there. You will see their names in most programs.

Definition

A built-in function comes ready inside a language. You can call it without writing it or importing anything. Python has print(), len() and int(). JavaScript has parseInt() and setTimeout(). Built-ins are tested by many people, so they are a safe first choice before you write your own.

Example code

python
print(len("Hello"))
# 5
Two built-ins in one line. len() counts and print() shows the answer.
The fifth card is a built-in. len() counts the five letters in hello.

Common mistake

Naming your own variable after a built-in, like list or len. The built-in is then hidden and stops working.

Key takeaways

  1. 1
    Ready to use. No import or set-up needed.
  2. 2
    Well tested. Used by millions of programs.
  3. 3
    Do not shadow. Never reuse their names.

Learn it properly