20 lines
398 B
Markdown
20 lines
398 B
Markdown
---
|
|
tags: [python]
|
|
---
|
|
|
|
# Python naming conventions
|
|
|
|
## Underscores
|
|
|
|
To name a variable or method with multiple words we use underscores to separate
|
|
each word.
|
|
|
|
```python
|
|
an_int = 32
|
|
print(an_integer.is_integer) # true
|
|
```
|
|
|
|
## Constants
|
|
|
|
There are no constants in Python. However there a pseudo-constants established
|
|
by convention. To denote that a variable should not change you use `UPPER_CASE`.
|