1 00:00:00,150 --> 00:00:04,970 Here are the rules that you have to follow for defining the python where. 2 00:00:05,310 --> 00:00:12,240 The first one is a variable must start with a letter or the underscored character. 3 00:00:12,540 --> 00:00:17,660 So names like Python is valid. 4 00:00:18,030 --> 00:00:20,960 Also name like underscored. 5 00:00:20,960 --> 00:00:28,300 Python is also one next a variable name can start with a number. 6 00:00:28,890 --> 00:00:41,770 So you can have a variable name that starts with the seven python but you can have a variable name which 7 00:00:41,830 --> 00:00:48,920 is something like this python 0 0 or 1. 8 00:00:48,950 --> 00:00:49,860 This is valid. 9 00:00:49,970 --> 00:00:56,780 So the next one is a variable name can only contain alphanumeric characters and underscored. 10 00:00:57,350 --> 00:00:59,470 Next is variable names. 11 00:00:59,500 --> 00:01:02,830 Case into 2 Say for example. 12 00:01:02,840 --> 00:01:14,330 Each in which all of the letters in lowercase and each year with the latest. 13 00:01:14,350 --> 00:01:25,720 It is incompetent and age the rateable age your which is all letters in uppercase are different variables 14 00:01:27,030 --> 00:01:32,120 then assigning a variable name to a value. 15 00:01:32,610 --> 00:01:40,680 There are certain it is a code word in Python that we should not use as variable names because these 16 00:01:40,680 --> 00:01:44,520 words already have special meaning in Python. 17 00:01:46,040 --> 00:01:56,930 Say for example the dissolved word if this is used this the if keyword is used in if clause or the if 18 00:01:56,930 --> 00:02:01,520 statement or it is old word for it. 19 00:02:01,970 --> 00:02:14,980 True and so on these exact words cannot be used as variable names. 20 00:02:15,220 --> 00:02:24,770 And if you try to assign a value to any of these reserved words or key words python will raise and edit 21 00:02:25,760 --> 00:02:26,700 so let's see this. 22 00:02:26,700 --> 00:02:34,040 In the Jupiter known book say for example we are going to use the resource to keyword forward as a variable 23 00:02:34,040 --> 00:02:36,870 name and assign the value to. 24 00:02:37,000 --> 00:02:48,380 And when you execute this line you get this error a syntax error and in order to see the list of desired 25 00:02:48,410 --> 00:02:53,570 keywords you can use the help function and then parse the argument. 26 00:02:53,630 --> 00:03:00,650 Key word and this will give you the list of keywords in Python. 27 00:03:03,790 --> 00:03:08,220 And these should not be used as variable names in your python programs 28 00:03:10,960 --> 00:03:12,150 similarly. 29 00:03:12,430 --> 00:03:19,570 There are several built in functions which are included in the python standard library and we should 30 00:03:19,570 --> 00:03:24,410 not use the names of these functions as variable names. 31 00:03:24,520 --> 00:03:32,410 Otherwise the reference to the built in function will be lost in order to understand this. 32 00:03:32,520 --> 00:03:42,750 Let's define a variable X assign the value to we use the built in function i.e. in order to know the 33 00:03:42,750 --> 00:03:46,490 memory address where the variable is pointing to. 34 00:03:46,530 --> 00:03:54,180 So we'll call the built in function idea and pass the variable x to this function. 35 00:03:54,180 --> 00:03:56,410 And this is the memory address. 36 00:03:57,340 --> 00:04:00,250 To which the variable x is pointing to. 37 00:04:00,250 --> 00:04:10,590 Now I'm going to use the built in function D as a variable name in my program and say I'm going to assign 38 00:04:10,590 --> 00:04:13,020 the value numeric value 5 39 00:04:16,230 --> 00:04:22,460 so I.D. is now pointing to value 5. 40 00:04:22,480 --> 00:04:32,100 Now if I call these same built in function and pass the variable x to this function I'm going to get 41 00:04:32,220 --> 00:04:33,450 a runtime error. 42 00:04:36,320 --> 00:04:41,940 So we should not use the names of these functions as variable names in other programs. 43 00:04:43,610 --> 00:04:49,430 Because overwriting a built in function might have undesired side effects 44 00:04:53,370 --> 00:05:02,490 similarly we should not be using built in functions like I n d for integer flawed as these are for string 45 00:05:02,760 --> 00:05:10,030 list type I.D. and so on as variable names in other programs.