1 00:00:00,740 --> 00:00:10,850 I want to add a quick note about this spacing that we see in this code now, this isn't just for Python 2 00:00:11,090 --> 00:00:14,000 in other languages, you'll always see this. 3 00:00:14,390 --> 00:00:21,680 You're not going to see that every single line of code always starts as well in the first space. 4 00:00:23,330 --> 00:00:29,600 Different languages will use this differently, but in order to organize code, usually you'll see some 5 00:00:29,600 --> 00:00:30,890 indentation like this. 6 00:00:32,490 --> 00:00:40,260 Now, Python, however, is unique because the indentation in spaces that we see here. 7 00:00:41,650 --> 00:00:46,370 Makes the interpreter see it and say, hey, this means something. 8 00:00:46,390 --> 00:00:51,400 The interpreter would actually see the space and say because there space here. 9 00:00:51,580 --> 00:00:59,770 I know that this is part of the if block in other languages like JavaScript, well, you have something 10 00:00:59,770 --> 00:01:07,870 similar, but usually you'll have an if statement and then some condition followed by make sure I spell 11 00:01:07,870 --> 00:01:08,290 condition. 12 00:01:08,290 --> 00:01:10,770 Right, followed by something like a curly brace. 13 00:01:11,470 --> 00:01:17,740 And in here, whatever is in here, you can see that I still get the space and I can do whatever I want. 14 00:01:18,100 --> 00:01:22,990 But JavaScript interpreter doesn't really care that their spaces. 15 00:01:22,990 --> 00:01:31,210 If I want, I could write my code just on one line like this and it's still valid JavaScript code. 16 00:01:32,180 --> 00:01:39,860 So people usually do the spacing more for style purposes, Python, on the other hand, is not just 17 00:01:39,860 --> 00:01:46,730 for styling that we do this, but because the interpreter actually finds meaning in the spaces, which 18 00:01:46,730 --> 00:01:49,670 is actually one of the big selling point with Python. 19 00:01:49,880 --> 00:01:54,570 It's a very clean there's no extra stuff here that makes it difficult. 20 00:01:54,590 --> 00:01:56,570 I mean, it's just English, right? 21 00:01:56,720 --> 00:02:01,370 If is old and if it is licensed, then print this. 22 00:02:01,640 --> 00:02:04,250 It just really nice to read and really clean. 23 00:02:05,060 --> 00:02:12,110 Now, if you notice here, my editor and we're going to talk about editors and IDs in an upcoming section. 24 00:02:12,530 --> 00:02:17,840 But if you are using the proper tools, this automatically is created for you. 25 00:02:18,870 --> 00:02:25,680 Now, in the programming world, there's this debate about Tab's and spaces and we're going to get into 26 00:02:25,680 --> 00:02:28,540 it, it's frankly a little bit silly. 27 00:02:28,740 --> 00:02:35,760 That is, some people prefer to hear if they want to create a space, they might use spaces or they 28 00:02:35,760 --> 00:02:37,800 might use taps. 29 00:02:38,580 --> 00:02:45,180 At the end of the day, with Python, the rule is you can use spaces, you can use the tab. 30 00:02:45,690 --> 00:02:50,250 But the idea that if you use spaces, you usually use four spaces. 31 00:02:50,610 --> 00:02:52,060 It's just a standard. 32 00:02:52,710 --> 00:02:54,450 Now, if you notice here. 33 00:02:55,630 --> 00:03:00,490 I actually don't have four spaces, it's two spaces here. 34 00:03:01,360 --> 00:03:07,320 And that is because up until now, well, I've just been following along whatever this Ed gives me, 35 00:03:07,750 --> 00:03:14,710 but if you look over here, there's an auto format, but if I click on this, it automatically formats 36 00:03:15,190 --> 00:03:15,880 my code. 37 00:03:16,990 --> 00:03:24,280 Into the appropriate format, and you see right over here that I now have four spaces, but you see 38 00:03:24,280 --> 00:03:26,080 that the code still works. 39 00:03:26,320 --> 00:03:32,860 Again, it's because at the end of the day, the important part is that there's a distinction between 40 00:03:32,860 --> 00:03:36,340 hierarchies that is the top and then maybe the children. 41 00:03:37,030 --> 00:03:40,990 But the interpreter itself is going to notice these spaces. 42 00:03:41,000 --> 00:03:52,360 So you do have to be careful because based on where this print is, as soon as I add a tab in here and 43 00:03:52,360 --> 00:03:53,590 I click run. 44 00:03:55,580 --> 00:03:59,720 What I get is old and is lysis, but as soon as one of this is false. 45 00:04:01,610 --> 00:04:02,870 And I click Ron. 46 00:04:04,070 --> 00:04:05,610 You see that, OK, OK. 47 00:04:05,660 --> 00:04:12,110 He runs only if this condition fails again, if previously both of these were true. 48 00:04:13,390 --> 00:04:20,790 I only get the first line printed so that little space here changes the outcome of my program. 49 00:04:21,280 --> 00:04:27,490 So you have to really be careful with this and luckily your editor or where you code is going to help 50 00:04:27,490 --> 00:04:28,210 you out with this. 51 00:04:28,480 --> 00:04:32,830 But it is a gotcha that if you're just starting out, you want to be mindful of. 52 00:04:33,460 --> 00:04:33,880 All right. 53 00:04:34,150 --> 00:04:36,160 No more debates about spaces and tabs. 54 00:04:36,340 --> 00:04:37,350 I'll see you in the next video. 55 00:04:37,730 --> 00:04:38,200 Bye bye.