1
00:00:00,650 --> 00:00:10,960
So to concatenate all the strings into one single string you can use the join method of strings.

2
00:00:10,960 --> 00:00:12,520
So this is a method of strings.

3
00:00:12,530 --> 00:00:13,760
This is a string here.

4
00:00:13,810 --> 00:00:16,310
For example let me put this string.

5
00:00:16,330 --> 00:00:19,060
It's just a dash but it's a still a string.

6
00:00:19,080 --> 00:00:23,410
This joint method gets a list as input.

7
00:00:23,530 --> 00:00:25,540
(["How are you",

8
00:00:25,540 --> 00:00:26,070
"good 

9
00:00:26,110 --> 00:00:28,240
good")].

10
00:00:28,270 --> 00:00:29,970
So that is a list of strings.

11
00:00:30,010 --> 00:00:38,590
If you execute that, these items of the list are going to be joined by this string here that you declared

12
00:00:38,620 --> 00:00:39,910
in here.

13
00:00:39,940 --> 00:00:44,910
So if you add more to make it more clear.

14
00:00:46,900 --> 00:00:50,980
So you're going to get a dash joining all these strings.

15
00:00:50,980 --> 00:00:53,260
These items of the list.

16
00:00:53,260 --> 00:01:04,930
The first item, the second item, the third item.
We can make use of that here by saying join the results

17
00:01:04,930 --> 00:01:07,130
list.

18
00:01:07,840 --> 00:01:08,380
Save that.

19
00:01:08,390 --> 00:01:09,010
Execute.

20
00:01:11,970 --> 00:01:13,390
Weather is good.

21
00:01:13,420 --> 00:01:17,940
And end. So how are you?Weather is good.

22
00:01:17,950 --> 00:01:19,670
We have a small problem here.

23
00:01:19,720 --> 00:01:25,510
We probably need a space between those strings so we can do that very easily.

24
00:01:25,510 --> 00:01:31,120
You can just put this space in the string and then execute again.

25
00:01:42,480 --> 00:01:47,160
And that is the output that's what we're expecting for our program.

26
00:01:47,160 --> 00:01:53,870
So this is how you make this program in this section,
you define a function on top of your script that

27
00:01:53,890 --> 00:01:56,640
does something and does it very good.

28
00:01:56,640 --> 00:02:04,060
Then you iterate, you make a loop, you ask the user for input in each iteration, immediately check each

29
00:02:04,070 --> 00:02:05,220
of the input

30
00:02:05,220 --> 00:02:14,110
was this string you don't want to append first and then check if the user input was equal to this.

31
00:02:14,130 --> 00:02:19,100
So you don't want to have this as a first condition because if you had that

32
00:02:19,470 --> 00:02:27,060
that means if the user enters here backslash end and then after that you had the results.append,

33
00:02:27,570 --> 00:02:32,890
that \end string will be appended to the results list.
You don't want that.

34
00:02:32,970 --> 00:02:39,630
Therefore you need to check immediately if the string is \end and brake the program if that

35
00:02:39,630 --> 00:02:43,910
is the case else then do this.

36
00:02:44,710 --> 00:02:52,110
So store the output of the census maker into the results list and then finally just concatenate the

37
00:02:52,110 --> 00:02:56,390
items of that list and print out the results which is this one here.

38
00:02:56,760 --> 00:03:01,920
I hope this program was useful for you and you learned something how to put the pieces together.

39
00:03:01,920 --> 00:03:02,470
In the next videos

40
00:03:02,480 --> 00:03:09,000
we're going to learn some more advanced things about Python and after that we're going to go through

41
00:03:09,000 --> 00:03:13,680
the first real world application, and the next application after that, and the next.

42
00:03:13,720 --> 00:03:19,170
And so you're going to have 10 applications, and I know that if you take those applications seriously

43
00:03:19,380 --> 00:03:21,260
you're going to be a good programmer.

44
00:03:21,330 --> 00:03:24,270
I wish you continue to enjoy my teachings in the next videos.

