In this Python article we want to learn about Python Built-in Functions Examples, Python is one of the most popular programming languages, and the reason is this that Python has a large set of builtin functions. these functions are pre defined in Python language, and can be used to perform different tasks. in this article we want to talk about some examples of Python builtin functions.
-
Print()
print() function is used to display output on the console. it takes one or more arguments and displays them on the console. this is an example:
1 |
print("Hello geekscoders.com") |
This will be the result

-
Len()
len() function is used to determine the length of a string, list or any iterable object. this is an example, run the code it will return 21.
1 2 |
my_string = "Hello geekscoders.com" print(len(my_string)) |
-
Range()
range() function is used to generate a sequence of numbers. it takes one, two or three arguments, this is an example.
1 2 3 |
my_range = range(1, 5) for number in my_range: print(number) |
This will be the result

-
Type()
type() function is used to determine type of an object. this is an example, this will return <class ‘str’>.
1 2 |
my_string = "Hello geekscoders.com" print(type(my_string)) |
-
Max() and Min()
max() and min() functions are used to find maximum and minimum values in an iterable object, this is an example:
1 2 3 |
my_list = [5, 10, 2, 8, 3] print(max(my_list)) print(min(my_list)) |
This will be the result

-
Sum()
sum() function is used to find sum of all elements in an iterable object. this is an example, if you run this code, you will receive 28.
1 2 |
my_list = [5, 10, 2, 8, 3] print(sum(my_list)) |
-
Sorted()
sorted() function is used to sort an iterable object in ascending order. this is our example:
1 2 |
my_list = [5, 10, 2, 8, 3] print(sorted(my_list)) |
This will be the result

-
Zip()
zip() function is used to combine two or more iterable objects into single iterable object. this is our example:
1 2 3 4 5 |
my_list1 = [1, 2, 3] my_list2 = ['a', 'b', 'c'] my_zip = zip(my_list1, my_list2) for item in my_zip: print(item) |
Run the code and this will be the result

Learn More
- Python Control Structures for Decision Making
- Iteration and Looping in Python Control Structures
- Python Control Structures for Conditional Statements
- Python Control Structure for Handling Exception
- Data Filtering with Python Control Structure
- Python Control Structure for Handling Input