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 lowercased
  • UpperCamelCase: 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:

Python
>>> 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.

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.

intermediate best-practices

For additional information on related topics, take a look at the following resources:


By Leodanis Pozo Ramos • Updated Jan. 8, 2026