1 00:00:01,100 --> 00:00:02,640 - [Instructor] In this Self Check exercise, 2 00:00:02,640 --> 00:00:04,780 we'd like you to try out the methods 3 00:00:04,780 --> 00:00:07,170 that you just learned in the preceding video. 4 00:00:07,170 --> 00:00:10,200 So we start with the name, Margo Magenta, 5 00:00:10,200 --> 00:00:12,040 with spaces on either side. 6 00:00:12,040 --> 00:00:14,010 And we'd like you to go ahead and strip 7 00:00:14,010 --> 00:00:16,080 all of the white space on either side, 8 00:00:16,080 --> 00:00:17,200 then only the left, 9 00:00:17,200 --> 00:00:19,740 and only the right white space as well. 10 00:00:19,740 --> 00:00:22,380 So go ahead and pause the video to give that shot. 11 00:00:22,380 --> 00:00:23,830 And come back for the answer. 12 00:00:28,150 --> 00:00:31,120 Okay, let's go ahead and reveal everything here. 13 00:00:31,120 --> 00:00:35,690 So as you can see, we have our name string, Margo Magenta, 14 00:00:35,690 --> 00:00:37,610 and I'll just go ahead and execute 15 00:00:37,610 --> 00:00:39,270 all of these at once here. 16 00:00:39,270 --> 00:00:41,780 As you can see, when we execute just strip, 17 00:00:41,780 --> 00:00:44,890 we remove both the leading and trailing white space, 18 00:00:44,890 --> 00:00:47,360 lstrip removes only the leading space, 19 00:00:47,360 --> 00:00:50,650 and rstrip removes only the trailing space. 20 00:00:50,650 --> 00:00:54,630 None of these calls are modifying the original string. 21 00:00:54,630 --> 00:00:59,250 So if I, for example, simply go in here and evaluate name, 22 00:00:59,250 --> 00:01:02,543 you can see I still have the original string in memory.