1 00:00:00,000 --> 00:00:02,400 [no audio] 2 00:00:02,400 --> 00:00:03,900 Friends here we are going to 3 00:00:03,900 --> 00:00:07,800 discuss about variable or variables, and we 4 00:00:07,800 --> 00:00:11,200 are going to see, what is a variable, how to declare a variable 5 00:00:11,200 --> 00:00:16,500 and use, and displaying a variable value using print, re-declare 6 00:00:16,500 --> 00:00:19,600 a variable, and how to delete a variable, and finally 7 00:00:19,600 --> 00:00:22,700 we are going to see rules to define a variable. 8 00:00:23,500 --> 00:00:26,200 Let me start with very first one, that is what is a variable. 9 00:00:27,100 --> 00:00:31,200 So before going to enter with your Python variable, let me 10 00:00:31,300 --> 00:00:34,900 explain your known thing, that is in your mathematics suppose 11 00:00:34,900 --> 00:00:36,700 if you write x=2, 12 00:00:38,200 --> 00:00:41,400 and then some y=3 x + 2, what you are doing? 13 00:00:42,800 --> 00:00:46,200 Any number 3, or 4, or 5, whatever it may be 14 00:00:46,900 --> 00:00:49,500 so if x=2, what is y value? 15 00:00:49,600 --> 00:00:55,400 Then you are saying, y=3 x 2=> 6=>6+4=>10, right 16 00:00:55,600 --> 00:01:00,100 Now here x is a variable, y is a variable, so you are assigning 17 00:01:00,100 --> 00:01:04,099 2 to x, and finally you are getting y value as 10, or simply 18 00:01:04,099 --> 00:01:06,200 10 assigned to Y. 19 00:01:07,200 --> 00:01:10,700 Now you can say finally after completion of this equation, 20 00:01:10,700 --> 00:01:13,300 you can say simply x value is 2, and y value is 10. 21 00:01:15,400 --> 00:01:16,600 Right. Now here 22 00:01:16,600 --> 00:01:20,400 we are saying that x and y are variables. Same meaning in 23 00:01:20,400 --> 00:01:21,600 your mathematics also. 24 00:01:23,000 --> 00:01:26,900 Right. But here in your mathematics simply you are assigning 25 00:01:26,900 --> 00:01:30,700 2 to x, and you are saying x=2 on paper, but here 26 00:01:30,700 --> 00:01:34,300 whenever if you define x=2 in your Python program 27 00:01:34,200 --> 00:01:36,800 or script what will happen means, your python will assign 28 00:01:36,800 --> 00:01:38,500 some memory location for your x, 29 00:01:39,100 --> 00:01:42,900 and in that memory location the value will be stored, and 30 00:01:42,900 --> 00:01:46,700 whenever if you want to access this value always you have to use x 31 00:01:47,300 --> 00:01:48,300 That's it. 32 00:01:48,300 --> 00:01:50,900 [no audio] 33 00:01:50,900 --> 00:01:53,600 So let me go with simple meaning for your variable. 34 00:01:54,400 --> 00:01:58,300 So a variable is nothing but a reserved memory location to 35 00:01:58,300 --> 00:02:00,700 store values or value. 36 00:02:02,100 --> 00:02:06,700 So whenever if you want to do some action, right, on your variable, 37 00:02:06,700 --> 00:02:10,699 yes, you can do it by taking that variable value. Right. How to 38 00:02:10,600 --> 00:02:15,000 take and how to use we will see. Then how to declare and use a variable? 39 00:02:15,000 --> 00:02:17,000 [no audio] 40 00:02:17,000 --> 00:02:19,700 No need to declare a variable before using them. 41 00:02:19,800 --> 00:02:21,300 That means, suppose guys 42 00:02:22,100 --> 00:02:25,900 I want to store x value as 2 in my Python program, or I want 43 00:02:25,900 --> 00:02:28,800 to store y value equals some 4.5. Now if you observe here 44 00:02:28,800 --> 00:02:31,200 x is an integer and y is a float point. 45 00:02:32,200 --> 00:02:35,700 So before going to assign 2 to x or 4.5 to y, you don't 46 00:02:35,700 --> 00:02:36,800 need to tell to your Python, 47 00:02:36,800 --> 00:02:42,100 I'm going to take x as an integer, 'int x', or y as integer, 'float y'. 48 00:02:43,400 --> 00:02:46,800 You don't need to tell this information to your Python. Python 49 00:02:46,800 --> 00:02:50,000 will automatically identify which type of data you are storing 50 00:02:50,000 --> 00:02:51,000 into your 'x', 51 00:02:51,900 --> 00:02:55,800 and that's why Python is called dynamic type language. 52 00:02:57,000 --> 00:03:02,200 Okay. Now let me show you this on your command line, or maybe through 53 00:03:02,200 --> 00:03:06,300 program, through script, or using your Python command line, right? 54 00:03:06,700 --> 00:03:09,800 So what you have to do is just open some editor, guys 55 00:03:09,800 --> 00:03:13,400 you can use either command line editors or if you have some GUI editors 56 00:03:13,400 --> 00:03:16,500 you can also use that, right. There write 57 00:03:16,500 --> 00:03:21,100 some line as 'a' equals to some 10, right. And if you want 58 00:03:21,100 --> 00:03:24,500 to print your 'a' value, you have to write 'print (a)', so that 59 00:03:24,500 --> 00:03:28,900 the value of 'a' will be printed, and already we have seen, right 60 00:03:29,000 --> 00:03:32,400 if you want to print a string using 'print' statement you are 61 00:03:32,400 --> 00:03:35,900 writing 'print', parentheses, inside of quotation some string, 62 00:03:36,300 --> 00:03:39,300 but whenever if you are printing a variable value don't use 63 00:03:39,300 --> 00:03:42,300 quotations. If you use quotations it will print as it 64 00:03:42,300 --> 00:03:45,600 is. I mean, let me do one thing. 65 00:03:45,600 --> 00:03:47,300 I am going to open my command line. 66 00:03:47,300 --> 00:03:49,400 [no audio] 67 00:03:49,400 --> 00:03:50,400 Okay. 68 00:03:50,400 --> 00:03:53,300 [no audio] 69 00:03:53,300 --> 00:03:55,400 Now I'm entering into my Python terminal. 70 00:03:55,900 --> 00:03:58,800 So guys whatever the line I am typing here the same lines 71 00:03:58,800 --> 00:04:00,400 you can write in your program as well. 72 00:04:01,100 --> 00:04:03,800 Let's say I am writing 'x' equals to some 4 number. 73 00:04:05,300 --> 00:04:07,500 Now, this is very first line in your program. Next line 74 00:04:07,500 --> 00:04:10,100 I am writing 'print(x)'. Now you can see the result. 75 00:04:11,000 --> 00:04:15,600 But if I write 'print("x")', it will print as it is, 76 00:04:15,700 --> 00:04:17,700 I mean 'x' will be printed as it is. 77 00:04:19,100 --> 00:04:24,600 So if 'x' is a variable you have to print without quotations 78 00:04:24,600 --> 00:04:27,800 for your variable. If it is not a variable and if you want 79 00:04:27,800 --> 00:04:31,700 to feel that as a string itself, right, you can print it in this way 80 00:04:31,700 --> 00:04:35,300 also. If you print in this way, you will get only 'x' not the 'x' value. 81 00:04:35,300 --> 00:04:37,100 [no audio] 82 00:04:37,100 --> 00:04:40,500 First of all, if you print in this way there is no relationship 83 00:04:40,500 --> 00:04:43,800 between your 'x' and this "x", because this is a 84 00:04:43,800 --> 00:04:45,300 string and this is our variable. 85 00:04:46,900 --> 00:04:49,900 Right. See if I print simply "Hello', 86 00:04:49,900 --> 00:04:53,000 [no audio] 87 00:04:53,000 --> 00:04:55,800 it is printing your string as it is because you are providing 88 00:04:55,800 --> 00:04:58,800 your message, or string, or text inside of quotations 89 00:04:58,800 --> 00:05:01,300 that's why your 'print' will print as it is. 90 00:05:01,300 --> 00:05:04,900 [no audio] 91 00:05:04,900 --> 00:05:09,500 Fine. Now, let me take 'y' equal to some number 5.6. Now I am 92 00:05:09,500 --> 00:05:11,500 going to print 'y' value. 93 00:05:12,000 --> 00:05:14,700 Yes, you are getting. And see that 94 00:05:15,100 --> 00:05:21,500 I want to know the type of your 'x' and 'y'. 'type(x)', integer 95 00:05:22,000 --> 00:05:24,500 'print', same lines 96 00:05:24,500 --> 00:05:27,200 we can write all lines in a program, and you can execute guys. 97 00:05:28,700 --> 00:05:29,900 'y', float. 98 00:05:29,900 --> 00:05:33,000 [no audio] 99 00:05:33,000 --> 00:05:35,400 Right. Let me open an editor. 100 00:05:35,600 --> 00:05:37,500 So I am going to use here Sublime Text. 101 00:05:37,600 --> 00:05:42,000 Of course, you can use 'vim' or 'PyCharm', right, 102 00:05:42,000 --> 00:05:46,000 whatever editor you prefer, right. 103 00:05:46,300 --> 00:05:52,100 So now let me use Sublime Text, 104 00:05:52,100 --> 00:05:56,100 [no audio] 105 00:05:56,100 --> 00:05:58,300 sorry, yeah Sublime Text. 106 00:05:58,300 --> 00:06:01,600 [no audio] 107 00:06:01,600 --> 00:06:04,800 So I'm going to open Sublime Text. Now using that Sublime 108 00:06:04,800 --> 00:06:08,900 Text whatever the lines you executed on your Python terminal, 109 00:06:08,900 --> 00:06:12,100 Python Shell, Python command line, same lines 110 00:06:12,100 --> 00:06:13,400 I am going to execute. 111 00:06:14,400 --> 00:06:17,800 Right. Let me copy line-by-line, and let me paste it here somewhere. 112 00:06:18,900 --> 00:06:21,000 So I'm going to save this as, 113 00:06:21,000 --> 00:06:23,100 [no audio] 114 00:06:23,100 --> 00:06:26,000 let me save first my program. 115 00:06:26,200 --> 00:06:29,300 Okay. Let me go to Desktop, because there we have some directory 116 00:06:29,300 --> 00:06:30,500 called 'PythonScripts'. 117 00:06:31,200 --> 00:06:32,700 So I am going to write here 118 00:06:34,200 --> 00:06:38,300 'working_with_variables.py', any program name you have 119 00:06:38,300 --> 00:06:39,600 to take, right? 120 00:06:40,800 --> 00:06:44,300 So 'x=4', is the first line you've done on your terminal, 121 00:06:45,400 --> 00:06:46,500 then 'print(x)'. 122 00:06:46,500 --> 00:06:48,700 [no audio] 123 00:06:48,700 --> 00:06:53,300 That's it. Now save it and run it. To run your program from 124 00:06:53,500 --> 00:06:55,000 your script from Sublime Text 125 00:06:55,000 --> 00:06:57,600 you have to run 'Ctrl + B'. 126 00:06:58,000 --> 00:07:01,400 You can see the output. So you know the advantage by 127 00:07:01,400 --> 00:07:04,300 using GUI editors is you can see your program here itself 128 00:07:04,300 --> 00:07:08,400 and also output, right. Then 129 00:07:09,000 --> 00:07:12,200 let me take one more thing called 'print("x")'. 130 00:07:12,900 --> 00:07:15,000 So guys, you have to know the difference between command 131 00:07:15,000 --> 00:07:17,500 line and your Python program. 132 00:07:17,900 --> 00:07:19,600 So command line what you are doing? 133 00:07:19,600 --> 00:07:23,400 You are executing line by line by typing your required line. 134 00:07:24,200 --> 00:07:27,200 Program, you're going to execute all lines one by one 135 00:07:27,200 --> 00:07:29,100 [no audio] 136 00:07:29,100 --> 00:07:34,200 with your Python. Let's say 'y=5.6'. 137 00:07:34,200 --> 00:07:35,700 I am going to declare 'y' value, 138 00:07:36,900 --> 00:07:40,000 right? Don't provide any spaces before starting your line. 139 00:07:40,200 --> 00:07:43,600 If you provide, it will give an indentation. Now 140 00:07:43,600 --> 00:07:51,500 let me print your 'y', then let me print your 'type(x)', and 141 00:07:51,500 --> 00:07:57,600 let me print your 'type(y)' as well, right. 142 00:07:57,900 --> 00:08:00,900 Now I save and I am going to run. Guys whenever if you run 143 00:08:00,900 --> 00:08:03,700 your Python program it will run from top to down. 144 00:08:04,900 --> 00:08:06,700 It will take first line, 'x=4'. 145 00:08:06,900 --> 00:08:08,000 There is no print statement. 146 00:08:08,000 --> 00:08:10,800 You won't get any output. Simply 4 value is assigned to 147 00:08:10,800 --> 00:08:15,700 'x'. Now after first line in your remaining program 'x' value 148 00:08:15,700 --> 00:08:20,000 is 4. Now because of second line, it will print the 'x'. 'x' 149 00:08:20,000 --> 00:08:23,300 value not 'x'. 'x' value means 4. Third line 150 00:08:23,300 --> 00:08:27,000 it will print 'x' as it is because you are writing 'x' as a string. 151 00:08:27,700 --> 00:08:29,900 Even fourth line "hello" will be displayed. 152 00:08:30,800 --> 00:08:35,799 Because of Fifth Line 'y' value is 5.6. Now 'print(y)', 'y' value will 153 00:08:35,799 --> 00:08:38,600 be printed. 'type(x)', what type of data you're storing into 154 00:08:38,600 --> 00:08:42,100 'x', and what type of data you're storing into 'y' that type 155 00:08:42,100 --> 00:08:45,500 of data will be displayed because of last two 'print' statements. 156 00:08:46,200 --> 00:08:48,700 And if you observe the output, final output, you're getting 157 00:08:49,000 --> 00:08:52,100 'integer' and 'float', last two 'print' statements. Observe that because 158 00:08:52,100 --> 00:08:55,200 of this Python is called dynamic type language. 159 00:08:56,400 --> 00:08:58,900 Right. So guys if you want to define any variable you have to write 160 00:08:58,900 --> 00:09:03,400 simply 'x=4', or 'y' equals some number, right. Fine. 161 00:09:05,000 --> 00:09:10,700 Now next thing is, re-declare a variable. See that very first 162 00:09:10,700 --> 00:09:12,400 line 'x=4', right. Now 163 00:09:12,400 --> 00:09:14,100 what I am doing is in ninth line 164 00:09:14,100 --> 00:09:17,500 I am writing 'x' equals some 23, and if I 'print' in tenth Line 165 00:09:17,500 --> 00:09:22,000 'x' value, you modified your 'x' value from for 4 to 23. 166 00:09:23,400 --> 00:09:27,300 See the output, last 'print' statement, 23 you are getting. So even 167 00:09:27,300 --> 00:09:30,600 while re-declaring your variable you don't need to tell to your Python 168 00:09:30,600 --> 00:09:33,700 I'm going to change my 'x' value in so and so line. Whenever if 169 00:09:33,700 --> 00:09:38,100 you want to feel to change your variable value, you are allowed. 170 00:09:38,100 --> 00:09:39,700 Directly you can change your 'x' value, 171 00:09:40,900 --> 00:09:44,900 right, in this way. Suppose very first line I define 10, then 172 00:09:44,900 --> 00:09:46,600 after some lines I'm modifying 'x' value, 173 00:09:46,600 --> 00:09:50,100 yes, you are allowed, right. Then, delete a variable. 174 00:09:51,300 --> 00:09:54,500 See first of all why we need to delete a variable value or 175 00:09:55,300 --> 00:09:59,400 variable? Just assume that guys, you're having some 1000s 176 00:09:59,400 --> 00:10:02,000 of lines of program, right, 177 00:10:03,500 --> 00:10:06,400 so assume these are the 500 lines, and these are 178 00:10:06,400 --> 00:10:08,500 the 500 lines. Somewhere here 179 00:10:08,500 --> 00:10:12,800 you define some variable value called 'x equals some 10, and 180 00:10:12,800 --> 00:10:15,500 you know that after 500 lines, 181 00:10:15,500 --> 00:10:18,100 I mean from 501 to 1000 lines, 182 00:10:19,100 --> 00:10:22,000 so here you are, no where you're using your 'x' variable value, 183 00:10:23,500 --> 00:10:27,000 right? But whenever if you run your Python program, whatever 184 00:10:27,000 --> 00:10:29,900 the variables you are defining, and whatever the operations 185 00:10:29,900 --> 00:10:33,100 you are performing, all those things will be performed from RAM memory. 186 00:10:34,900 --> 00:10:38,800 Right. So if you are not going to use here your 'x' variable value 187 00:10:38,800 --> 00:10:41,200 why should we keep that in my program? 188 00:10:41,400 --> 00:10:43,800 Why should we keep that in RAM memory? Unnecessarily I am going 189 00:10:43,800 --> 00:10:46,000 to waste my RAM memory, right? 190 00:10:46,200 --> 00:10:49,400 You can delete, you can free up your RAM memory by deleting 191 00:10:49,400 --> 00:10:54,400 your variable value if you are not using that, right. Simply 192 00:10:55,100 --> 00:11:01,300 'del x'. See that after tenth line nowhere I am using variable 193 00:11:01,300 --> 00:11:04,100 called 'x'. Then in eleventh line what I will do? Simply I will 194 00:11:04,100 --> 00:11:06,200 delete 'x'. In case after deleting 195 00:11:06,200 --> 00:11:09,600 if you try to print your 'x' value, there is no more 'x', you 196 00:11:09,600 --> 00:11:14,200 will get an error. "name 'x' is not defined", because by this line 197 00:11:14,200 --> 00:11:19,700 your Python is removing from its history your 'x'. Now there 198 00:11:19,700 --> 00:11:21,500 is no 'x' in your python, 199 00:11:23,100 --> 00:11:24,400 right, that's why you are getting an error. 200 00:11:24,800 --> 00:11:28,400 So if you are not using then only you have to delete it, right, 201 00:11:28,400 --> 00:11:32,100 so simply remember how to delete a variable value. Simply 'del x'. 202 00:11:32,100 --> 00:11:34,300 [no audio] 203 00:11:34,300 --> 00:11:38,700 Fine. Now next thing is, rules to define variable names. 204 00:11:40,100 --> 00:11:42,800 So as of now guys, we have taken variable names as like 'x' 205 00:11:42,800 --> 00:11:45,600 and 'y', but in real time you may take, suppose you are going 206 00:11:45,600 --> 00:11:48,100 to find Java version then instead of 'x' and 'y', 207 00:11:48,100 --> 00:11:52,100 I will take a variable called 'java_version=', something. 208 00:11:52,200 --> 00:11:54,400 I will write some logic to find my Java version. 209 00:11:55,400 --> 00:11:58,300 Right. So likewise, you can take some variable names. No need to 210 00:11:58,300 --> 00:12:01,700 take like a 'x' and 'y'. Suppose I am going to install some Java, 211 00:12:02,000 --> 00:12:06,600 right? So 'install_pkg', I will take simply "java", 212 00:12:08,000 --> 00:12:09,400 so this is my variable name. 213 00:12:09,700 --> 00:12:11,100 'java_version' is my variable name. 214 00:12:11,100 --> 00:12:13,400 [no audio] 215 00:12:13,400 --> 00:12:18,600 Right. So now while selecting your variable names you have to follow 216 00:12:18,600 --> 00:12:20,100 some rules, right. 217 00:12:20,100 --> 00:12:21,900 Let me go with that rules one by one. 218 00:12:22,500 --> 00:12:25,400 It contains letters, numbers, and underscore. 219 00:12:26,400 --> 00:12:28,400 So whatever the variable name you are selecting, 220 00:12:29,100 --> 00:12:33,500 it may be simply 'xyz' or 'pq', right. But also you can take 221 00:12:33,500 --> 00:12:36,400 some lengthy variable names. While taking lengthy variable 222 00:12:36,400 --> 00:12:39,400 names, your variable names should include only this group 223 00:12:39,400 --> 00:12:43,000 of, not include, it may contain either letters, 224 00:12:43,200 --> 00:12:45,300 or numbers, and underscore. 225 00:12:45,900 --> 00:12:46,900 Don't take anything 226 00:12:46,900 --> 00:12:48,500 other than from these three groups. 227 00:12:49,700 --> 00:12:53,800 Suppose '$' is not there in our three, either in this, or 228 00:12:53,800 --> 00:12:56,900 in this, or in this, so don't take '$' in your variable 229 00:12:56,900 --> 00:12:58,100 name. Suppose 230 00:12:58,100 --> 00:13:01,400 I want to define 'xy', 'xy' equals some number 10. It's fine. 231 00:13:01,900 --> 00:13:03,900 But 'x$' or '$x', 232 00:13:04,100 --> 00:13:05,200 don't take in that way. 233 00:13:06,700 --> 00:13:08,700 '$x' or 'x$', 234 00:13:08,700 --> 00:13:10,300 they are invalid variable names. 235 00:13:10,300 --> 00:13:11,300 Don't take them. 236 00:13:13,000 --> 00:13:14,700 Right. Then second one, 237 00:13:14,700 --> 00:13:16,600 it should not be a keyword. 238 00:13:17,200 --> 00:13:24,200 See actually, if we take simply 'if', right, 'if' is a valid variable 239 00:13:24,200 --> 00:13:29,000 name only based on your three groups because it is containing only letters. 240 00:13:30,100 --> 00:13:33,800 Right. But the thing is 'if' is already predefined word for 241 00:13:33,800 --> 00:13:35,800 your Python to do some particular action, 242 00:13:36,800 --> 00:13:41,800 that's why don't take predefined words as your variable names 243 00:13:42,700 --> 00:13:45,200 like 'print'. You know, what is the purpose of 'print'. 'print' is 244 00:13:45,200 --> 00:13:48,500 used to print something. And don't take 'print' as suppose some 245 00:13:49,200 --> 00:13:50,200 variable name. 246 00:13:50,700 --> 00:13:53,800 Let me take 'print' equals some number 40. Don't take 'print' 247 00:13:53,800 --> 00:13:56,600 as your variable name because 'print' is already predefined 248 00:13:56,600 --> 00:13:58,900 word for your python. Right. 249 00:13:59,600 --> 00:14:02,700 So guys, you know need to mug up about your predefined words 250 00:14:02,700 --> 00:14:07,200 or keywords, while practicing you will come to know, right. 251 00:14:07,200 --> 00:14:09,400 So after completion of your complete Python, you will come 252 00:14:09,400 --> 00:14:10,600 to know which are the keywords. 253 00:14:10,600 --> 00:14:12,400 [no audio] 254 00:14:12,400 --> 00:14:15,700 Right. Then, can't contain spaces. 255 00:14:15,700 --> 00:14:18,200 You should not include a space in your variable name. 256 00:14:18,200 --> 00:14:21,800 Let's say, let me take command line. 257 00:14:22,000 --> 00:14:23,000 Anything is fine, no. 258 00:14:23,700 --> 00:14:27,100 I am taking 'my name' equal to suppose "narendra". 259 00:14:28,600 --> 00:14:31,800 So 'my name', my variable name contains a space. 260 00:14:31,900 --> 00:14:32,900 So it is invalid. 261 00:14:32,900 --> 00:14:35,000 [no audio] 262 00:14:35,000 --> 00:14:39,900 Right. So don't take any spaces in your variable names. Then, 263 00:14:40,400 --> 00:14:42,200 it should not start with a number. 264 00:14:43,600 --> 00:14:46,300 Yeah, one more thing guys, don't take, 265 00:14:46,700 --> 00:14:49,800 don't take space in your variable name. Whenever if you want 266 00:14:49,800 --> 00:14:54,100 to feel to take a space, instead of space just club those 267 00:14:54,100 --> 00:14:57,700 two in this way, 'my_name'. Now it is like two words, but we 268 00:14:57,700 --> 00:14:59,700 are clubbing these two words with underscore. 269 00:15:00,300 --> 00:15:04,200 Right. So underscore is allowed in our variable name, right. From 270 00:15:04,200 --> 00:15:05,600 here underscore is allowed, 271 00:15:07,300 --> 00:15:09,800 so that's why I can take simply 'my_name', 272 00:15:13,300 --> 00:15:18,400 or 'my_value', 'my_number', anything you can. No problem. 273 00:15:18,400 --> 00:15:23,200 Okay. So whenever if you want to take a space inside of your 274 00:15:23,200 --> 00:15:28,300 variable just replace that space with underscore. Then fine. 275 00:15:28,700 --> 00:15:32,100 Next one is, it should not start with a number. Suppose guys 276 00:15:32,100 --> 00:15:36,600 You can write 'x1' equal to some number, and 'x2' equal to some, 277 00:15:36,900 --> 00:15:38,600 one more number, right? 278 00:15:38,600 --> 00:15:43,300 And if you print simply 'x1', and if you print simply 'x2', it's 279 00:15:43,300 --> 00:15:44,100 working perfectly. 280 00:15:44,900 --> 00:15:48,600 But if we take '1x', that is invalid variable name. 281 00:15:49,700 --> 00:15:53,600 So don't start your variable name with number. 282 00:15:55,300 --> 00:15:57,500 Right. And it is case sensitive. 283 00:15:58,800 --> 00:16:03,400 Case sensitive means small 'x=4' and 'X' is 284 00:16:03,400 --> 00:16:04,300 some different variable. 285 00:16:04,300 --> 00:16:09,600 Let me print both 'x' and 'X'. Guys they are 286 00:16:09,600 --> 00:16:13,600 different. Case sensitive means 'x' and 'X', they are different. 287 00:16:13,600 --> 00:16:18,100 You can use 'x' as one variable and 'X' as one more variable. 288 00:16:19,300 --> 00:16:21,400 Okay, and the last one is guys, 289 00:16:21,400 --> 00:16:23,700 [no audio] 290 00:16:23,700 --> 00:16:28,400 You should not start with the number, right but in your valid, 291 00:16:30,200 --> 00:16:33,400 for your valid variable names you have these three groups - 292 00:16:33,400 --> 00:16:35,000 letters, numbers, and underscore. 293 00:16:35,500 --> 00:16:38,200 You can also start your variable with underscore. 294 00:16:38,200 --> 00:16:40,100 Let's say '_x' equals some number. 295 00:16:40,300 --> 00:16:42,300 It is valid but don't start with a number. 296 00:16:42,300 --> 00:16:44,500 [no audio] 297 00:16:44,500 --> 00:16:45,500 Okay. So guys, 298 00:16:45,500 --> 00:16:48,400 these are the important points to remember while defining 299 00:16:48,400 --> 00:16:51,700 variable name, or while selecting a variable name whenever 300 00:16:51,700 --> 00:16:53,300 if you are writing your Python scripts. 301 00:16:53,300 --> 00:16:55,200 [no audio] 302 00:16:55,200 --> 00:16:57,500 Right. Okay guys, 303 00:16:57,500 --> 00:16:58,800 thank you for watching this video. 304 00:16:58,800 --> 00:17:00,500 [no audio]