1
00:00:00,720 --> 00:00:07,020
Yesterday, we improved the way the to do items were displayed in the command line.

2
00:00:07,050 --> 00:00:11,370
You remember there was a brake line between the two two items.

3
00:00:12,950 --> 00:00:16,640
So I showed you two ways to remove that brick line.

4
00:00:16,640 --> 00:00:20,180
One way was to create a list comprehension.

5
00:00:20,180 --> 00:00:22,160
So that is a list comprehension.

6
00:00:22,160 --> 00:00:27,530
The list comprehension went over each of the items and it removed that brake line.

7
00:00:27,530 --> 00:00:34,850
So the backslash n is a brick line and that is the syntax for a list comprehension.

8
00:00:34,850 --> 00:00:35,630
But then.

9
00:00:36,860 --> 00:00:43,370
I also showed you a better way to remove that brake line without having to create a list comprehension.

10
00:00:45,010 --> 00:00:49,660
And that was to remove the brake line using a strip method.

11
00:00:52,110 --> 00:00:59,610
So that meant we didn't have to iterate over the items in a list comprehension since we are already

12
00:00:59,610 --> 00:01:00,420
iterating here.

13
00:01:00,420 --> 00:01:04,980
So why not doing two things in one loop?

14
00:01:05,489 --> 00:01:07,500
So here we print out those.

15
00:01:10,090 --> 00:01:10,780
Items.

16
00:01:10,780 --> 00:01:15,040
But before we bring them out, why not just stripping them from the brake lines?

17
00:01:15,930 --> 00:01:17,850
So that was what we did yesterday.

18
00:01:18,360 --> 00:01:24,120
Often there are different ways to do something, but as a programmer, slowly you will understand which

19
00:01:24,120 --> 00:01:25,140
way to pick.

20
00:01:26,610 --> 00:01:33,630
You'll see, which makes the code more readable and which adds redundancy to your code.

21
00:01:34,970 --> 00:01:36,680
And the redundancy is not a good thing.

22
00:01:36,680 --> 00:01:37,160
So.

23
00:01:38,110 --> 00:01:40,180
You'll get that with experience.

24
00:01:41,170 --> 00:01:41,350
Yep.

25
00:01:41,470 --> 00:01:43,700
Let's move on to the next videos of the day.

26
00:01:43,720 --> 00:01:45,130
I'll see you in the next one.

