Global Functions in Python
Learn Python built-in global functions available everywhere without imports: len, range, type, print, input, map, filter, zip, enumerate, sorted, and more.
Introduction to Built-in Functions
Python provides many built-in functions that are always available. You do not need to import anything to use them. These functions help with printing, type checking, math operations, iteration, and more.
1. print()
Display output to the console.
2. input()
Read user input as string.
Type & Information Functions
These functions help understand the type and properties of objects.
1. type()
Check data type.
2. id()
Return memory identity.
3. callable()
Check if object can be called like a function.
Basic Math Built-ins
Python provides several built-in math-related functions without importing the math module.
1. abs()
Absolute value.
2. round()
Round number.
3. min(), max(), sum()
Aggregate values.
Iteration Helpers
These functions help with iteration and functional programming.
1. range()
Generate sequence of numbers.
2. enumerate()
Get index and value.
3. zip()
Combine multiple sequences.
Functional Built-ins
Python provides functional-style helpers like map, filter, any, all.
1. map() and filter()
Transform and filter.
2. any() and all()
Boolean aggregation.