This repository contains a collection of exercises to practice Python string functions. These exercises are designed to help you become familiar with common string manipulation techniques in Python.
The exercises cover the following string functions:
len(): Returns the length of the string.str(): Converts an object to a string.upper(): Converts all characters in a string to uppercase.lower(): Converts all characters in a string to lowercase.strip(): Removes leading and trailing whitespace (or other characters).replace(): Replaces occurrences of a substring with another substring.split(): Splits a string into a list of substrings based on a delimiter.join(): Joins a list of strings into a single string with a specified delimiter.find(): Returns the lowest index of the substring if it is found in the string.count(): Returns the number of occurrences of a substring in the string.startswith(): Checks if the string starts with a specified substring.endswith(): Checks if the string ends with a specified substring.isalpha(): Checks if all characters in the string are alphabetic.isdigit(): Checks if all characters in the string are digits.
- Clone the repository to your local machine.
- Open
questions.mdto view the exercises. - Implement your solutions in a separate Python file or interactive notebook.
- Feel free to submit pull requests with your solutions or improvements!
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
This project is licensed under the MIT License.