Skip to main content

Rules for the Variable name

1.     It allows both lower and upper case alphabets as variable name.

2.     It does not start with digit but after the first character it allows digits.

3.     It does not allows any special symbols except the underscore(_)

4.     It does not allows any keyword as variable name

5.     It does not allows blank spaces and commas with in the variable name.

Program:

car=10

CAR=20

car1=30

_car=40

If=50

car_no=60

print(car)

print(CAR)

print(car1)

print(_car)

print(If)

print(car_no)

Output:

10

20

30

40

50

60


Comments