Member-only story
Hi everyone, welcome back. Strings are a data type in the Python language. Strings hold a sequence of characters including letters of the alphabet, numbers, and even symbols. We’re going to take a look at some of the built in functions that Python provides that allows us to interact with strings.
String Functions
- capitalize(): Updates the first character to become upper case
- casefold(): Updates the entire string to become lower case
- center(): Returns a centered string
- count(): Returns a number of how many time a given value appears in a string
- encode(): Returns an encoded version of the string
- endsWith(): Checks if the string ends with a given value
- expandtabs(): Set the tab size of the string
- find(): Searches for a given value within the string and returns the index number of where it was found
- format(): Formats given values within the string
- index(): Searches for a given value within the string and returns the index number of where it was found
- isalnum(): Checks if all characters within the string are alphanumeric
- isalpha(): Checks if all characters…