062 List Comprehension With Functions - Comprehensive Python In Tamil
REPL
❯ uv run python
Python 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> [num for num in range(10)]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> [num for num in range(10) if num % 2 == 0]
[0, 2, 4, 6, 8]
>>> [num * 2 for num in range(10)]
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
>>> not(True)
False
>>>Code