Officially, variable names in Python can be any length and can consist of uppercase and lowercase letters ( A-Z, 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 cannot be a digit. Python’s most-followed style guide, PEP8 also suggests us to limit each line to 79 characters, so, to be extra careful, we will assume variables can be of at most 7 characters in length.Now, the question is, how many variable names can there be in Python if we abide by these two rules?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here