Strings in Python
Check out the video tutorial before you move onto the next bits:
That done, let's take a closer look at string slicing.
Take a string
sample_string = 'Crazy Codigo'
The indexing of the string will look like this -
Now we know splitting works on three arguments which determine how the string is parsed
sample_string[start: end: skip]
start: The index where the parser should start
end: The index before which the parser should stop (if end point is at n, the parsing ends at n-1)
skip: The number of indices the parser should skip in between each index
Try running the following snippet of code in the interpreter below:
print(sample_string[2: 8: 2])
Now, try new strings and combinations on your own. Next time, we'll see what else we can do with strings. Cya!