1
00:00:00,330 --> 00:00:04,810
Lopes permit us to repeat that action and the Python programming language.

2
00:00:04,830 --> 00:00:07,140
We have two main kinds of loops.

3
00:00:07,680 --> 00:00:10,440
We have the wire loop and the FA loop.

4
00:00:10,890 --> 00:00:17,790
Now, if the number of actions we are about to take out and known initially, we generally use the while

5
00:00:17,790 --> 00:00:22,170
loop and the case where the number of actions are already known.

6
00:00:22,290 --> 00:00:29,640
We generally use the for loop, but there are ways of actually using any of them in either case, although

7
00:00:29,640 --> 00:00:32,490
the follow up is more limited as compared to the while loop.

8
00:00:33,210 --> 00:00:37,410
Now let's take some examples of how we use this in the Python programming language.

9
00:00:37,920 --> 00:00:39,210
So we want to print out.

10
00:00:40,170 --> 00:00:42,240
I am at position.

11
00:00:45,240 --> 00:00:46,170
Position one.

12
00:00:47,870 --> 00:00:49,610
And then do this.

13
00:00:52,600 --> 00:00:59,890
So we want to point out my position two, three, four and five, one to do this five times rapidly.

14
00:01:00,430 --> 00:01:08,890
Now, if this and or in this case we have an equals five is we want to do this and times and this gives

15
00:01:08,890 --> 00:01:09,670
any cause five.

16
00:01:09,670 --> 00:01:10,840
So we do this five times.

17
00:01:11,080 --> 00:01:15,250
Now, if this entered to 500, we'll have to repeat this 500 times.

18
00:01:15,580 --> 00:01:18,910
And that's not very efficient.

19
00:01:19,270 --> 00:01:24,520
So to solve this problem, we could use a follow up where we just simply say for I in range.

20
00:01:26,140 --> 00:01:26,710
Five.

21
00:01:27,670 --> 00:01:28,900
We have Prince.

22
00:01:32,480 --> 00:01:34,640
I am at a position.

23
00:01:36,690 --> 00:01:39,330
I would you have to put I.

24
00:01:40,020 --> 00:01:40,760
And there we go.

25
00:01:40,820 --> 00:01:41,390
A good place.

26
00:01:41,400 --> 00:01:42,180
This would end.

27
00:01:42,660 --> 00:01:47,100
And is this for now we have that our large this we have this.

28
00:01:49,620 --> 00:01:57,720
We have I am a position this is an area we haven't put this the former but format of I take this away

29
00:01:57,990 --> 00:02:01,200
or run this tortoise and arrow take this away.

30
00:02:01,320 --> 00:02:02,670
We have this so we'll find out.

31
00:02:02,670 --> 00:02:05,460
We have this now for the follow up.

32
00:02:05,460 --> 00:02:09,180
Why do you have this for whatever in a range?

33
00:02:09,720 --> 00:02:14,520
Generally what happens here is the range has a start index.

34
00:02:16,150 --> 00:02:25,850
And and and index ones you have only one value in your the stat index by default is zero.

35
00:02:25,900 --> 00:02:27,910
So in this case it's the same as put in this.

36
00:02:28,420 --> 00:02:29,360
So actually this is.

37
00:02:30,070 --> 00:02:30,430
All right.

38
00:02:30,430 --> 00:02:31,180
I would have comma.

39
00:02:31,210 --> 00:02:32,050
So we have this.

40
00:02:32,350 --> 00:02:35,320
So doing this is the same as having.

41
00:02:36,700 --> 00:02:43,540
Range, zero comma and.

42
00:02:47,300 --> 00:02:50,870
No, this is the same as doing this simply syringe.

43
00:02:50,870 --> 00:02:53,000
And now that we have this.

44
00:02:53,360 --> 00:02:59,780
What actually this loop does, it is goes from zero right up to N minus one.

45
00:03:00,290 --> 00:03:05,690
This is very similar to when we were working with lists where we had a list C one.

46
00:03:07,470 --> 00:03:08,280
Three four.

47
00:03:09,510 --> 00:03:17,700
And if one of the lays out some elements, this would take us from 0 to 2 instead of from 0 to 3.

48
00:03:18,060 --> 00:03:20,700
So doing this gave us zero, this and this.

49
00:03:20,880 --> 00:03:21,840
So we'll print out this.

50
00:03:21,840 --> 00:03:23,550
We're going to have one, three, four.

51
00:03:24,420 --> 00:03:31,170
Now, coming back to the followup, the simple means if we walk in here, we are going to have four

52
00:03:31,170 --> 00:03:32,760
I in range.

53
00:03:32,760 --> 00:03:40,860
Recall the in operator where we want to take this variable we're creating so we're going to take four

54
00:03:40,860 --> 00:03:44,550
I for all this I's in this range.

55
00:03:44,580 --> 00:03:49,670
Now this range goes from zero to n minus one.

56
00:03:49,680 --> 00:03:55,590
So what we're seeing here is for all I, which goes from zero to end, minus one.

57
00:03:55,980 --> 00:03:59,340
Repeat this statement, I'll repeat this action.

58
00:03:59,580 --> 00:04:06,870
So for all I going from zero to n minus one, we are going to print I am at position I and so when I

59
00:04:06,870 --> 00:04:08,010
equals zero we're going to print.

60
00:04:08,010 --> 00:04:09,440
I am at position zero.

61
00:04:09,450 --> 00:04:13,050
When I equals one, I am at position one and so on and so forth.

62
00:04:13,290 --> 00:04:15,630
So we'll see that we actually replace this.

63
00:04:16,410 --> 00:04:25,140
Now with this, if you notice, yeah, we're printing from zero and that's because the default, that

64
00:04:25,140 --> 00:04:26,070
index is zero.

65
00:04:26,400 --> 00:04:27,630
So let's modify this.

66
00:04:27,630 --> 00:04:30,000
We have one and we print that out.

67
00:04:30,660 --> 00:04:32,010
Now let's think of this.

68
00:04:33,900 --> 00:04:36,120
We run this that we go from 1 to 4.

69
00:04:36,330 --> 00:04:40,260
And that's because we have right up to the end index minus one.

70
00:04:40,530 --> 00:04:46,440
So if we want to bring up to five, we simply put here and plus one and doing this now we have from

71
00:04:46,440 --> 00:04:53,130
1 to 5 and if wanted to go to 500, I want it to do is to run this and we simply go with see how we

72
00:04:53,140 --> 00:04:55,980
able to go from this to 500.

73
00:04:58,420 --> 00:04:59,080
And so that's it.

74
00:04:59,090 --> 00:05:01,050
That's how the following works.

75
00:05:01,660 --> 00:05:02,620
I should use this.

76
00:05:02,770 --> 00:05:04,660
And we have that now.

77
00:05:04,660 --> 00:05:05,560
We can take this off.

78
00:05:06,850 --> 00:05:13,030
Now, it's important to note that we loops generally we have an initial statement and then we have.

79
00:05:14,680 --> 00:05:16,150
And increments.

80
00:05:16,840 --> 00:05:19,450
So in this case, we have the initial statement.

81
00:05:19,990 --> 00:05:25,450
All we have the initial value of I to be equal equals zero on this case one.

82
00:05:25,690 --> 00:05:28,090
So in this case, the initial value of AI is one.

83
00:05:28,270 --> 00:05:33,400
And now we increment his value up to where we reach and plus one minus one.

84
00:05:33,430 --> 00:05:37,990
So if we have this will basically increment this value from zero to and minus one.

85
00:05:38,620 --> 00:05:43,780
So let's look at the while loop taking the Y loop.

86
00:05:44,380 --> 00:05:47,560
It actually works a little bit different for a while loop.

87
00:05:47,560 --> 00:05:51,850
If we want to do this same action that is, print this to the end times.

88
00:05:51,850 --> 00:05:52,750
We have any cause.

89
00:05:53,560 --> 00:05:58,420
Five In this case we could simply have while n is less than five.

90
00:05:58,900 --> 00:06:03,580
So while we have this condition, we repeat whatever we have here.

91
00:06:04,330 --> 00:06:06,580
So any less than five, we have print.

92
00:06:07,900 --> 00:06:09,580
I am at position.

93
00:06:12,090 --> 00:06:12,570
This.

94
00:06:13,200 --> 00:06:14,760
So we have that format.

95
00:06:16,840 --> 00:06:20,450
I now notice this is a little bit different.

96
00:06:20,470 --> 00:06:22,210
Like the eye doesn't come in this.

97
00:06:22,890 --> 00:06:24,330
I like to follow where this.

98
00:06:24,340 --> 00:06:25,810
I came with afar.

99
00:06:26,140 --> 00:06:30,400
Yeah, we just have this while in less than five, so we just have this condition.

100
00:06:30,880 --> 00:06:35,110
Now we have to declare the eye separately so we can have eye initially at zero.

101
00:06:35,530 --> 00:06:41,020
And then whenever we reach in this, we could put this eye plus equals one.

102
00:06:41,290 --> 00:06:46,420
Now this eye plus equals one is simply seen eyes equals eye plus one.

103
00:06:46,990 --> 00:06:53,860
So if eye is zero, any guess and you're Italian to one since it ends at one, it's going to continue,

104
00:06:53,980 --> 00:06:55,240
and so on and so forth.

105
00:06:55,540 --> 00:06:57,190
So let's run this and see what we have.

106
00:06:58,310 --> 00:06:59,120
Running this.

107
00:07:00,110 --> 00:07:02,780
We see that not in this printed and that is logical.

108
00:07:03,990 --> 00:07:07,170
Because anything was five.

109
00:07:07,710 --> 00:07:13,470
So we are seeing it and any less than five we should continue doing this given that end is always equals

110
00:07:13,470 --> 00:07:16,200
five and is not changing actually when we get into this.

111
00:07:17,250 --> 00:07:18,840
We are never going to get into this.

112
00:07:19,380 --> 00:07:24,250
So actually wiser which is here and it's less than five we don't have any out of place where antennas

113
00:07:24,250 --> 00:07:28,070
of five or and turns to a value less than five.

114
00:07:28,080 --> 00:07:29,850
So we're never going to get into this loop.

115
00:07:30,300 --> 00:07:32,160
So what we can do is we can modify this.

116
00:07:32,850 --> 00:07:33,960
We have your eye.

117
00:07:34,140 --> 00:07:39,840
So why I is less than five and now we keep on incrementing and I will see that initially I is already

118
00:07:39,840 --> 00:07:41,670
less than five since I is equal to zero.

119
00:07:41,880 --> 00:07:46,200
So we are obviously going to get into this loop and we're going to print this out.

120
00:07:46,200 --> 00:07:53,250
So what I did in five would keep on doing this and once I turn this five, since Iceman increment,

121
00:07:53,250 --> 00:07:56,300
increment it, we are going to go out of this loop.

122
00:07:56,310 --> 00:07:57,840
So let's run this and see what we get.

123
00:07:58,320 --> 00:08:00,690
So this is exactly what we wanted to have.

124
00:08:01,140 --> 00:08:04,140
So we have this let's reduce its value.

125
00:08:05,930 --> 00:08:08,060
Oh, that's the end to be a equals three.

126
00:08:08,900 --> 00:08:10,370
I would take it as an end.

127
00:08:10,730 --> 00:08:12,380
So we'll run this now on this.

128
00:08:12,380 --> 00:08:12,590
Well.

129
00:08:12,980 --> 00:08:15,430
Now let's go step by step and see what happens.

130
00:08:15,440 --> 00:08:15,980
Exactly.

131
00:08:16,640 --> 00:08:19,730
At the beginning, we have an equals three and I equals zero.

132
00:08:20,450 --> 00:08:21,020
So we have.

133
00:08:21,020 --> 00:08:27,260
Then when this comes here, we have I0 and three zero is obviously less than three.

134
00:08:27,500 --> 00:08:29,690
So we're going to come in here and print out.

135
00:08:29,690 --> 00:08:30,830
So we print out.

136
00:08:31,970 --> 00:08:33,170
There's value with zero.

137
00:08:33,290 --> 00:08:34,460
So that's why we have this.

138
00:08:34,700 --> 00:08:38,240
Once this is printed out, I turn to one.

139
00:08:38,870 --> 00:08:42,820
And since I is one, I is less than three.

140
00:08:42,830 --> 00:08:49,430
So with the coming year and print is out, once that is printed out, it prints out this one.

141
00:08:49,910 --> 00:08:50,900
That is the print out.

142
00:08:50,900 --> 00:08:52,340
I am at position zero.

143
00:08:52,340 --> 00:08:54,860
So this actually represents I am at position.

144
00:08:55,130 --> 00:08:57,110
So let's write this out like this.

145
00:08:57,470 --> 00:08:58,880
I am at position.

146
00:09:00,440 --> 00:09:02,420
Wherever I am at position.

147
00:09:05,270 --> 00:09:06,110
We have this.

148
00:09:07,310 --> 00:09:08,900
I am at position.

149
00:09:08,930 --> 00:09:09,320
Okay.

150
00:09:09,560 --> 00:09:10,400
So we have that.

151
00:09:11,030 --> 00:09:14,750
And once it prints this one out, it sends it to two.

152
00:09:15,440 --> 00:09:17,300
And that's because I'm incremented here.

153
00:09:17,690 --> 00:09:24,410
So with a while, we actually do this increment by hand, of which with a follow, we didn't have to

154
00:09:24,410 --> 00:09:24,820
do this.

155
00:09:24,830 --> 00:09:26,330
It does automatically.

156
00:09:26,840 --> 00:09:27,650
So we have that.

157
00:09:28,100 --> 00:09:33,410
And then since I is equal to two, is less than three, that's really less than three.

158
00:09:33,590 --> 00:09:39,320
So he so gets into the loop and then we print out I am at position two.

159
00:09:41,010 --> 00:09:43,500
Once it pans out, it tends to three.

160
00:09:44,190 --> 00:09:46,110
But the reason strictly it isn't three.

161
00:09:46,110 --> 00:09:47,700
So it goes out of the loop.

162
00:09:47,700 --> 00:09:52,980
And that's why I always get pinned areas this three different outputs.

163
00:09:54,000 --> 00:10:01,080
Now we could simply modify this to I plus one I will find here that we have we have this so we have

164
00:10:01,080 --> 00:10:02,790
one, two, three as expected.

165
00:10:03,120 --> 00:10:07,410
Now we could send this to 5%, this to 500.

166
00:10:12,740 --> 00:10:13,820
And as was expected.

167
00:10:14,660 --> 00:10:15,830
So let's modify this.

168
00:10:16,970 --> 00:10:17,510
There we go.

169
00:10:17,930 --> 00:10:20,990
So that's basically how the while in the follow ups work.

170
00:10:21,350 --> 00:10:25,760
Now let's come back to the problem we had initially where we had the different parts.

171
00:10:26,090 --> 00:10:32,030
And we wondered that if a player actually plays any of those parts, it should be printed out.

172
00:10:32,330 --> 00:10:36,170
We saw how difficult it was to go using only conditions.

173
00:10:36,440 --> 00:10:40,490
So let's look for a new way of solving that problem.

174
00:10:41,030 --> 00:10:47,570
So we could simply see here that for I in range the line of spots.

175
00:10:48,940 --> 00:10:49,280
I wish.

176
00:10:49,300 --> 00:10:51,370
I understand why we're using this line of sports.

177
00:10:51,550 --> 00:10:56,890
So for our little sports, we're going to see, for example, Prince I so run in this will see that

178
00:10:56,890 --> 00:10:57,580
we have this.

179
00:10:57,820 --> 00:11:01,690
This tells us that L.A. sports actually equals to because this is for iron range.

180
00:11:01,960 --> 00:11:06,030
This is the same as I in Orange, too.

181
00:11:06,490 --> 00:11:09,640
That's because sports actually contains this two elements.

182
00:11:09,700 --> 00:11:13,990
So is this list with two elements or is Len is actually two?

183
00:11:14,470 --> 00:11:16,120
So that's why we have the zero one.

184
00:11:16,720 --> 00:11:17,680
Let's take this away.

185
00:11:18,440 --> 00:11:20,860
We could even add the other sports here.

186
00:11:21,280 --> 00:11:22,930
So we have volleyball.

187
00:11:24,170 --> 00:11:24,740
And that's it.

188
00:11:25,070 --> 00:11:30,200
So yeah, we have four iron range lens parts printed as I put it again.

189
00:11:30,230 --> 00:11:34,910
See that we have this now we could actually even print land sports before.

190
00:11:35,330 --> 00:11:36,860
So we have land sports.

191
00:11:39,070 --> 00:11:40,780
As it tells this story.

192
00:11:41,860 --> 00:11:50,260
Now consider ed if that that's for particular I if supports I now we know that but zero for example

193
00:11:50,260 --> 00:11:52,750
is basically this football string.

194
00:11:53,110 --> 00:11:54,250
Sports one is this.

195
00:11:54,580 --> 00:11:55,990
And sports two is this.

196
00:11:56,200 --> 00:11:57,490
So it is a particular sport.

197
00:11:57,490 --> 00:12:04,510
I is it was very important to put this brackets it makes it work and it.

198
00:12:04,840 --> 00:12:07,360
So if sports I is actually equals football.

199
00:12:08,530 --> 00:12:09,460
Well then I print out.

200
00:12:11,330 --> 00:12:13,370
I am a footballer.

201
00:12:15,190 --> 00:12:23,710
And then we have l if sports I is equals.

202
00:12:26,140 --> 00:12:27,220
Basketball.

203
00:12:30,420 --> 00:12:30,990
Print out.

204
00:12:31,620 --> 00:12:37,290
So this is actually the one space front we have print.

205
00:12:40,580 --> 00:12:42,890
I am a basketballer.

206
00:12:45,800 --> 00:12:49,520
And finally, we have Alief Sparks.

207
00:12:50,720 --> 00:12:55,100
I equals volleyball.

208
00:12:57,870 --> 00:12:59,820
So let's put a string volleyball.

209
00:13:02,480 --> 00:13:03,260
Well, print out.

210
00:13:06,130 --> 00:13:10,690
I am a volley baller and that is it.

211
00:13:11,260 --> 00:13:12,670
So let's run this and see what we get.

212
00:13:13,120 --> 00:13:19,010
Now, given that we have football, basketball and volleyball, we have I am a footballer, I'm a basketball

213
00:13:19,090 --> 00:13:20,320
and I am a volleyball.

214
00:13:20,920 --> 00:13:25,630
Now, if we take off one of this, we simply have this.

215
00:13:26,050 --> 00:13:30,850
So this shows how easy it is to work with loops while trying to solve that problem.

216
00:13:31,180 --> 00:13:32,230
What can replace here?

217
00:13:32,440 --> 00:13:33,490
Simply have is.

218
00:13:33,910 --> 00:13:37,930
So if this is this, see that it doesn't change anything.

219
00:13:41,230 --> 00:13:41,830
So that was it.

220
00:13:43,400 --> 00:13:47,060
Now, there's no way of looking at those loops and sort of working like this.

221
00:13:47,390 --> 00:13:48,530
Let's couple this year.

222
00:13:52,720 --> 00:13:58,240
Up and this year we have instead of saying four I arranged learn of this lives for going going through

223
00:13:58,540 --> 00:14:06,460
each and every index will seem to see for I in sports I could see a for sport does a singular and then

224
00:14:06,460 --> 00:14:14,790
there's a plural for so for sport in sports if a particular sport is football in this sport is basketball

225
00:14:14,810 --> 00:14:20,200
playing that if that's part as volleyball in this so that's how we go and we see that we have exactly

226
00:14:20,200 --> 00:14:21,130
the same results.

227
00:14:21,400 --> 00:14:29,560
So instead of going through the in this is sports I and whatever are in the index we simply go by each

228
00:14:29,560 --> 00:14:32,590
of the elements or we'll see a for sport in sports.

229
00:14:32,890 --> 00:14:38,380
So what happens here is we're going to start with the first this and then we'll try it this year, this

230
00:14:38,380 --> 00:14:42,490
year and Thursday and then we go to the next we're going to test this test.

231
00:14:42,520 --> 00:14:43,540
So that's how it works.

232
00:14:44,110 --> 00:14:47,350
Now, if, for example, make an area you can have this.

233
00:14:47,350 --> 00:14:50,890
So see that since this is not the same as this, that doesn't work out well.

234
00:14:51,340 --> 00:14:53,740
So let's put this back and that's it.

235
00:14:54,400 --> 00:15:03,120
Now you can add other sports, tennis, what example and simply just put out this so we have live if

236
00:15:03,130 --> 00:15:10,000
you put else print this should give you I am a tennis player.

237
00:15:11,220 --> 00:15:12,990
So we have this and that is because.

238
00:15:14,290 --> 00:15:19,760
This case when we does this, for example, that for the first case since sport equals football and

239
00:15:19,760 --> 00:15:21,910
the beginning it goes into this.

240
00:15:22,270 --> 00:15:28,360
And then for the next case since part equals volleyball test and it works out with this for the next

241
00:15:28,360 --> 00:15:32,590
case since there's since part actually equals tennis.

242
00:15:32,710 --> 00:15:34,690
It doesn't match with this it doesn't match with this.

243
00:15:34,690 --> 00:15:37,330
It doesn't match with this or else actually it takes this.

244
00:15:37,330 --> 00:15:40,180
And that's why we have I am a tennis player now.

245
00:15:40,180 --> 00:15:41,650
Let's look at the break.

246
00:15:43,150 --> 00:15:45,220
Pass and continue.

247
00:15:45,550 --> 00:15:50,020
Keywords which are rarely used in loops.

248
00:15:50,620 --> 00:15:52,110
Now suppose we have this.

249
00:15:52,390 --> 00:15:56,950
We want that every time we have a footballer, we should simply break so we can have a break.

250
00:15:57,340 --> 00:16:02,460
And doing this once again into this and you have this break would go out of this for a loop.

251
00:16:02,770 --> 00:16:03,370
So we shall see it.

252
00:16:03,370 --> 00:16:04,240
I won't print this.

253
00:16:04,240 --> 00:16:08,980
We have just I am a footballer and that is because we've also got this took a break and we would left

254
00:16:08,980 --> 00:16:09,820
this for a loop.

255
00:16:11,000 --> 00:16:17,510
Now, if you take this, take this as a break, see that brings this out.

256
00:16:18,710 --> 00:16:22,190
Since there is no basketball here, he doesn't even get here.

257
00:16:22,220 --> 00:16:23,630
So his everything is printed out.

258
00:16:24,050 --> 00:16:30,710
Now, if this brig is actually put here oh per year, for example, you see that football is printed

259
00:16:30,710 --> 00:16:31,280
basketball.

260
00:16:31,280 --> 00:16:32,750
I spend it all right.

261
00:16:32,750 --> 00:16:36,980
Our football has printed, volleyball is printed, but tennis player is not printed because at this

262
00:16:36,980 --> 00:16:39,020
point we leave the loop.

263
00:16:40,340 --> 00:16:43,400
Now let's look at how continue our pass works.

264
00:16:47,270 --> 00:16:50,330
So suppose we reach this point, we could have continue.

265
00:16:51,560 --> 00:16:54,110
So run in this we see that everything works actually fine.

266
00:16:54,620 --> 00:16:57,980
Now suppose we want to have a certain value.

267
00:16:58,010 --> 00:16:58,640
So we see.

268
00:17:00,810 --> 00:17:03,990
We take this A to B equals true.

269
00:17:04,470 --> 00:17:09,240
So initially is true and we see it at we're going to continue from this point.

270
00:17:09,240 --> 00:17:15,150
So we have e equals false and then we're going to print out.

271
00:17:16,340 --> 00:17:18,350
E so let's run this.

272
00:17:18,710 --> 00:17:20,750
We see that actually is equals.

273
00:17:20,750 --> 00:17:21,080
True.

274
00:17:21,500 --> 00:17:22,850
The reason why is true.

275
00:17:22,970 --> 00:17:30,320
Whereas we actually got into this and we sent a to false is simply because once we get to this continue,

276
00:17:30,320 --> 00:17:32,240
what happens is this continue.

277
00:17:32,240 --> 00:17:35,570
It tells us to go to the next iteration.

278
00:17:35,960 --> 00:17:41,960
Now notice I recall that walking with loops is basically I the region of our this induces.

279
00:17:41,990 --> 00:17:44,870
So we start with this, we go to this and we go to this.

280
00:17:45,230 --> 00:17:51,740
So once we come to this board and we have this continue automatically after printing this, we go directly

281
00:17:51,740 --> 00:17:55,070
to the next add the reason we don't bother about the remaining part of it.

282
00:17:55,640 --> 00:17:57,410
So no matter where you put out here.

283
00:17:57,430 --> 00:18:01,910
So if you put this hello, normally you shouldn't have anything here.

284
00:18:01,940 --> 00:18:05,780
And that's because this continue tells us to go to the next iteration immediately.

285
00:18:06,320 --> 00:18:08,060
So that's how Continue works.

286
00:18:08,630 --> 00:18:10,190
And then we also have pass.

287
00:18:10,880 --> 00:18:17,460
So with this, suppose you have this and you don't want to actually print out whatever.

288
00:18:17,480 --> 00:18:21,440
So you could just simply say pass because if you take this off, you're going to have an error.

289
00:18:22,370 --> 00:18:26,930
And now sometimes you may not have anything to put here, so you may not have any action to take.

290
00:18:27,170 --> 00:18:29,090
So you just want to have this condition.

291
00:18:29,300 --> 00:18:35,360
And then maybe another condition, say, l if spark is.

292
00:18:37,310 --> 00:18:38,060
Handball.

293
00:18:38,210 --> 00:18:39,110
Also your hand.

294
00:18:40,070 --> 00:18:41,540
And yeah, you want to print something?

295
00:18:41,540 --> 00:18:42,610
So you see on a print.

296
00:18:43,220 --> 00:18:43,760
Hello?

297
00:18:45,300 --> 00:18:47,370
And in this case, the gist of.

298
00:18:49,030 --> 00:18:49,740
Things out.

299
00:18:51,060 --> 00:18:56,710
And once we get into this condition, we don't want to print any value or print out whatever.

300
00:18:56,760 --> 00:18:58,770
So we just simply have this pass.

301
00:18:59,880 --> 00:19:01,200
So that's it for this section.

302
00:19:01,350 --> 00:19:04,320
The next section, which I've been working on Python functions.
