Why built-in functions in python are faster ?Python Code Optimization why
Because Python is sitting of the shoulders of giants. Built-in functions are written in C and C++ under the hood.
C and C++ languages are efficient and fast, so their functions will be faster than the functions you write in Python. So it is recommended to use built-in functions instead of creating new ones.