In addition to what others have said, collection literals are also faster. list[str]() performs a function call that technically might not be the built-in list. Where [] is always an empty list and it can be created with less overhead.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments