top of page

Variable Naming Conventions in Python

Updated: Apr 19, 2023

The variable names in Python can start with _ or a letter.



It should not start with a number. After that it can contain any combination of _ and alphanumeric characters.




#valid variable names
just_var = "Hello World!"
justvar = "Hello World!"
_just_var = "Hello World!"
justVar = "Hello World!"
JUSTvar = "Hello World!"
JustVar = "Hello World!"
justvar1 = "Hello World!"

#invalid variable names
#1justVar1 = "Hello World"

The link to the Github repository is here .

2 views

Related Posts

How to Install and Run Ollama on macOS

Ollama is a powerful tool that allows you to run large language models locally on your Mac. This guide will walk you through the steps to...

bottom of page