String slicing can be helpful when manipulating and extracting from strings.
What is the result of the expression "Hello".length()?
The method returns the index of the first occurrence of a specified substring.
String Manipulation
The method returns the number of occurrences of a specified substring in a string.
Using a step value in string slicing allows you to skip characters. For example, [::2] will return characters.
Positive index
Which string method is used to convert a string to lowercase?
The replace() method can also be used to remove specified characters from a string by replacing them with an empty .
Strings are a sequence of .
Strings Methods
Negative index
The replace() method is case-sensitive, meaning that it will only replace occurrences of the specified phrase with the specified replacement if they have the same .
Which method is used to check if a string contains a specified sequence of characters?