Chapter 3: Conditional Execution

preview_player
Показать описание
Correction: Contrary to what I have said (7:23), spaces ARE preferred over tabs in Python.
---Tabs or Spaces? Spaces are the preferred indentation method. Tabs should be used solely to remain consistent with code that is already indented with tabs. Python disallows mixing tabs and spaces for indentation (PEP 8 -- Style Guide for Python Code). But most Python IDEs (VS Code, PyCharm, etc.) have already set it automatically where 1 tab = 4 spaces.

Рекомендации по теме