camel case
Camel case is a naming convention where you write a multi-word identifier without spaces, and use capitalization to mark word boundaries. The term is used broadly, but it’s often helpful to distinguish the two common variants:
lowerCamelCase: First word lowercasedUpperCamelCase: First word uppercased (commonly called Pascal Case)
Python’s style guide, PEP 8, recommends snake_case for function names, variable names, method names, and instance attributes. It also recommends UpperCamelCase for class names.
Example
Here’s a quick example illustrating camel case usage:
>>> class ClassName: # Camel case for class name
... def method_name(self):
... greeting = "Hello, World!"
... print(greeting)
...
>>> obj = ClassName()
>>> obj.method_name()
Hello, World!
In this example, ClassName follow camel case conventions.
Related Resources
Tutorial
How to Write Beautiful Python Code With PEP 8
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators.
For additional information on related topics, take a look at the following resources:
- Python Classes: The Power of Object-Oriented Programming (Tutorial)
- Writing Beautiful Pythonic Code With PEP 8 (Course)
- How to Write Beautiful Python Code With PEP 8 (Quiz)
- Inheritance and Internals: Object-Oriented Programming in Python (Course)
- Class Concepts: Object-Oriented Programming in Python (Course)
- Python Classes - The Power of Object-Oriented Programming (Quiz)
By Leodanis Pozo Ramos • Updated Jan. 8, 2026