How to Return an Empty List from a Function in Python?
Method 1: Return a New Empty List Using Square Brackets You can return an empty new list from a Python function using the square bracket notation [] after the return keyword using the expression return []. Here’s an example: The example also shows that the two created empty lists using two function calls point to … Read more