Officially, variable names in Python can be any length and can consist of uppercase and lowercase letters (
a-z), digits (
0-9), and the underscore character (
_). An additional restriction is that, although a variable name can contain digits, the first character of a variable name can’t be a digit.
Become a Member to join the conversation.