1 00:00:00,540 --> 00:00:01,140 Welcome back. 2 00:00:01,470 --> 00:00:11,040 Remember in Python, that string is written as a star and this is a special word, actually, it's a 3 00:00:11,040 --> 00:00:14,320 built in what we call function or built in action that we can take. 4 00:00:14,940 --> 00:00:16,280 Now, let me ask you this. 5 00:00:16,800 --> 00:00:18,750 What happens if I do string? 6 00:00:21,390 --> 00:00:25,140 One hundred is clearly a number, an integer. 7 00:00:26,130 --> 00:00:29,520 But what if we run the string function on this? 8 00:00:30,560 --> 00:00:31,110 Let's find out. 9 00:00:31,220 --> 00:00:31,790 Let's do. 10 00:00:32,870 --> 00:00:34,100 Print here. 11 00:00:35,370 --> 00:00:37,620 And then run this if I click, run. 12 00:00:40,040 --> 00:00:47,930 I get a hundred, all right, but hmm, is this an int or a string? 13 00:00:50,480 --> 00:00:59,090 To find that out once again, let's wrap this up, so the answer of whatever this value is into type. 14 00:01:04,870 --> 00:01:11,800 I know this is a lot of brackets, but remember, we're evaluating this piece of code, so we're turning 15 00:01:11,800 --> 00:01:17,230 a hundred into a string or running the string action, and then we're going to check the type of this 16 00:01:17,230 --> 00:01:19,600 entire thing and then we're going to print it out. 17 00:01:19,930 --> 00:01:20,830 If I click, run. 18 00:01:22,530 --> 00:01:31,290 I see that it's a string type, so we've converted one hundred into string using this now just to confuse 19 00:01:31,290 --> 00:01:32,460 you a little bit more. 20 00:01:32,610 --> 00:01:34,470 What if we do something like. 21 00:01:40,400 --> 00:01:42,740 All right, even more brackets, what happens now? 22 00:01:42,770 --> 00:01:43,400 Can you guess? 23 00:01:45,620 --> 00:01:52,700 Well, we convert a hundred into a string, then convert it back into an integer, and then we check 24 00:01:52,700 --> 00:01:55,610 the type of it, which is a class int and then we print that. 25 00:01:56,330 --> 00:02:06,110 So remember, this was the same as me saying A equals a star one hundred and then B is going to equal 26 00:02:06,950 --> 00:02:07,400 int. 27 00:02:09,480 --> 00:02:19,260 Of a because we're evaluating this part and then I'm saying C is going to equal the type of whatever 28 00:02:19,740 --> 00:02:23,670 B is, and then finally we're printing C. 29 00:02:24,840 --> 00:02:28,200 So that piece of code was the same as doing this. 30 00:02:30,090 --> 00:02:31,170 Very, very cool. 31 00:02:31,830 --> 00:02:35,730 Now, this is the idea of type conversion. 32 00:02:36,850 --> 00:02:44,800 Again, if I were to write that down, it's called type conversion, we're converting the type of our 33 00:02:44,800 --> 00:02:51,130 data types and you can do that throughout programming and we'll talk a lot about this throughout the 34 00:02:51,130 --> 00:02:51,550 course. 35 00:02:52,090 --> 00:02:55,840 But it's the main reason we have things like SDR int. 36 00:02:56,050 --> 00:03:00,100 We have things like float and many other data types that we're going to talk about. 37 00:03:00,820 --> 00:03:02,860 I'll see in the next video by.