Skip to content

sahil007-ai/python-string-functions-exercises-

Repository files navigation

Python String Functions Exercises

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.

List of Exercises

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.

How to Use

  1. Clone the repository to your local machine.
  2. Open questions.md to view the exercises.
  3. Implement your solutions in a separate Python file or interactive notebook.
  4. Feel free to submit pull requests with your solutions or improvements!

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.

License

This project is licensed under the MIT License.

About

A collection of exercises to practice Python string functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages