Chen Yu
last year
Chencountry asked

What is camelCase?

Kelish Rai
Expert
last year
Kelish Rai answered

camelCase is a way of writing names where each new word starts with a capital letter, and there are no spaces or underscores. Example: myVariableName, firstName, lastName, and totalCount.

However, in Python, we usually prefer using snake_case (like my_variable_name) for variable names, where each word is separated with an underscore (_). Still, it's helpful to know what camelCase is, since you might come across it in other languages or examples.

You’ll learn more about variable naming toward the end of this chapter, which should make things clearer.

Let me know if anything’s unclear.

Python
This question was asked as part of the Getting started with Python course.