How to Create an Empty List in Python - freeCodeCamp.org
https://www.freecodecamp.org/news/python-empty-list-tutorial-how-to-create-an-empty-list-in-python/
Jun 18, 2020 · Because the list was empty, so it evaluates to False. In general: If the list is not empty, it evaluates to True, so the if clause is executed. If the list is empty, it evaluates to False, so the else clause is executed. Example: In the example below, we create an empty list and assign it to the variable num. Then, using a for loop, we add a ...
DA: 97 PA: 66 MOZ Rank: 86