What is the naming convention in Python for variable and function?
In Python, variable and function names should be lowercase, with words separated by underscores.
In Python, variable and function names should be lowercase, with words separated by underscores. For example:
Naming convention in Python
my_variable = "Hello, world!"
def my_function():
print("This is my function.")
<div class="alert alert-info flex not-prose">![]()
<span class="hidden md:block">Watch a video course</span>Python - The Practical Guide</div>
Additionally, variable and function names should be descriptive and meaningful, in order to make the code more readable and easier to understand.