# Python Syntax — Python

Source: https://www.geekswithgeeks.com/en/python/py-syntax

> Indentation defines blocks — no braces.

## Indentation is structure

Use 4 spaces per level. Mixing tabs and spaces is an error.

```python
def greet(name):
    if name:
        print(f"Hi, {name}")
    else:
        print("Hi, stranger")
```

## Statements & comments

One statement per line, no semicolon. `#` starts a comment. Names are case-sensitive.
