1 00:00:00,430 --> 00:00:01,359 Welcome back. 2 00:00:01,390 --> 00:00:10,120 Remember in Python, that string is written as STR and this is a special word. 3 00:00:10,180 --> 00:00:14,500 Actually, it's a built in what we call function or a built in action that we can take. 4 00:00:14,770 --> 00:00:16,510 Now, let me ask you this. 5 00:00:16,630 --> 00:00:18,940 What happens if I do string? 6 00:00:19,600 --> 00:00:20,560 100. 7 00:00:21,240 --> 00:00:25,320 100 is clearly a number, an integer. 8 00:00:26,030 --> 00:00:29,690 But what if we run the string function on this? 9 00:00:30,480 --> 00:00:31,170 Let's find out. 10 00:00:31,170 --> 00:00:32,009 Let's do. 11 00:00:32,770 --> 00:00:34,270 Print here. 12 00:00:35,360 --> 00:00:37,790 And then run this if I click Run. 13 00:00:39,990 --> 00:00:41,550 I get 100. 14 00:00:41,820 --> 00:00:42,560 All right. 15 00:00:42,570 --> 00:00:43,230 But. 16 00:00:44,040 --> 00:00:44,490 Hmm. 17 00:00:44,820 --> 00:00:48,150 Is this an int or a string? 18 00:00:50,410 --> 00:00:51,670 To find that out. 19 00:00:51,670 --> 00:00:54,720 Once again, let's wrap this. 20 00:00:54,970 --> 00:00:59,230 So the answer of whatever this value is into type. 21 00:01:00,770 --> 00:01:01,610 Like so. 22 00:01:04,849 --> 00:01:11,780 I know this is a lot of brackets, but remember, we're evaluating this piece of code, so we're turning 23 00:01:11,780 --> 00:01:14,810 100 into a string or running the string action. 24 00:01:14,810 --> 00:01:20,120 And then we're going to check the type of this entire thing and then we're going to print it out if 25 00:01:20,120 --> 00:01:20,990 I click Run. 26 00:01:22,510 --> 00:01:24,890 I see that it's a string type. 27 00:01:24,910 --> 00:01:29,440 So we've converted 100 into string using this. 28 00:01:29,560 --> 00:01:34,600 Now, just to confuse you a little bit more, what if we do something like. 29 00:01:36,120 --> 00:01:36,740 Didn't. 30 00:01:38,530 --> 00:01:39,370 Like this. 31 00:01:40,380 --> 00:01:40,830 All right. 32 00:01:40,830 --> 00:01:41,800 Even more brackets. 33 00:01:41,820 --> 00:01:42,730 What happens now? 34 00:01:42,750 --> 00:01:43,560 Can you guess? 35 00:01:45,510 --> 00:01:53,040 Well, we convert 100 and to a string, then convert it back into an integer and then we check the type 36 00:01:53,040 --> 00:01:55,800 of it which is a class int and then we print that. 37 00:01:56,160 --> 00:02:07,620 So remember this was the same as me saying a equals str 100 and then B is going to equal int. 38 00:02:09,530 --> 00:02:19,430 Of A because we're evaluating this part and then I'm saying C is going to equal the type of whatever 39 00:02:19,670 --> 00:02:20,810 B is. 40 00:02:21,470 --> 00:02:23,840 And then finally we're printing C. 41 00:02:24,700 --> 00:02:28,360 So that piece of code was the same as doing this. 42 00:02:30,040 --> 00:02:31,360 Very, very cool. 43 00:02:31,690 --> 00:02:35,890 Now, this is the idea of type conversion. 44 00:02:36,840 --> 00:02:40,890 Again, if I were to write that down, it's called type conversion. 45 00:02:41,490 --> 00:02:49,320 We're converting the type of our data types, and you can do that throughout programming and we'll talk 46 00:02:49,350 --> 00:02:56,400 a lot about this throughout the course, but it's the main reason we have things like STR int, we have 47 00:02:56,400 --> 00:03:00,270 things like float and many other data types that we're going to talk about. 48 00:03:00,780 --> 00:03:01,950 I'll see you in the next video. 49 00:03:02,400 --> 00:03:03,000 Bye bye.