mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-24 22:50:00 +08:00
1.0 KiB
1.0 KiB
Basic Syntax
Python's syntax is designed to be readable and concise. Instead of braces, Python uses indentation (conventionally four spaces) to define code blocks, and a colon ends the line that opens a block such as an if statement, loop, or function definition. Statements usually end at the end of the line without a semicolon, comments start with #, and variables are created simply by assigning to them, with no type declaration needed. Identifiers are case-sensitive, and the official style guide, PEP 8, describes conventions such as snake_case names for variables and functions.
Visit the following resources to learn more: