Files
developer-roadmap/roadmaps/python/content/basic-syntax@6xRncUs3_vxVbDur567QA.md

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: