PYTHON: Why  is faster than list()
If you are familiar with python, you may know there are two popular ways for initializing a list
And for curious minds  is faster than list(), here’s why
It’s because  is a literal syntax ( literal syntax is something that is constant and behaves in a pre-determined way) and whereas list on the other hand is a built-in constructor i.e an object that is waiting to be executed. The moment you execute it-list(), it returns an empty list.
Let’s disassemble and see what happens in the background
Here list() requires a global lookup and a call function, but  compiles it into a single instruction and creates an empty list right off the hook.
Not just a list, but any function or class, be it user-defined or built-ins has the same behavior. As said earlier, list is just an object waiting to be executed.
Here’s the result using the timeit module
We can clearly see the time difference that  is faster than list()
Hope you find it useful and Thanks for reading!