-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVariableName.py
More file actions
28 lines (23 loc) · 768 Bytes
/
VariableName.py
File metadata and controls
28 lines (23 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# A variable name must start with a letter or the underscore character
# A variable name cannot start with a number
# A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
# Variable names are case-sensitive (age, Age and AGE are three different variables)
# A variable name cannot be any of the Python keywords.
myvar = "Dishang"
my_var = "Dishang"
_my_var = "Dishang"
myVar = "Dishang"
MYVAR = "Rana"
myvar2 = "Dishang"
print(_my_var)
print(MYVAR)
# Multi Words Variable Names
# Camel Case
# Each word, except the first, starts with a capital letter
myVarName='Rean'
# Pascal Case
# Each word starts with a capital letter
MyVarName='Hela'
# Snake Case
# Each word is separated by an underscore character
my_var_name='Unak'