Python With Spyder 4: Strings, Indexing, and Slicing

This is the 4th in a series of videos providing a tutorial on Python 2.7 using Anaconda Python and the Spyder IDE. Click here to go to a “home page” for the video series.

The topics covered in this video are strings, indexing, and slicing.

The video is about 13 minutes long.

PWS4-DSSThumb

Next Video: Lists Part 1

Video Index: Strings, Indexing, and Slicing

Click on the topics below to jump to that location in the video.

Time Topic
00:00 Introduction
00:27 Create a string using double quotes
01:06 String property length and built-in function len()
01:31 Create a string using single quotes
01:47 Concatenate strings with “+”
02:08 String indexing
02:29 String indexing begins at 0
02:41 Indexing is done with square brackets (“[]”)
03:14 Index of the last letter is the length minus 1
03:31 Error when index is equal to the length
03:59 Negative indexing
04:43 Summary of string indexing
05:11 Slicing – ranges of letters in strings
06:30 One-sided slicing – leaving out the left or right index of the slice
07:30 Mutable and immutable data
08:03 Strings are immutable
08:09 Cannot assign to string index
08:43 String methods (functions)
08:55 upper() method
09:13 split() method
09:52 Convert number to string with str()
10:46 Convert a string that is a real number to type float with float()
11:38 Convert a string that is an integer to type integer with int()
11:55 Conclusion

Next Video: Lists Part 1

1 thought on “Python With Spyder 4: Strings, Indexing, and Slicing

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.