Methods :
1) Count ()
- returns how many times a particular element or substring
appears in a list, tuple, or string during program execution
2) capitalize ()
- method returns a copy of a string with the first character
capitalized and the rest lowercased, at runtime when the
code is executed.
3) Title ()
- method returns a new string where the first character of
each word is capitalized (like a book title), and it’s done at
runtime based on the input or string given.
4) Index ()
- method returns the position (index) of the first
occurrence of a specified element or substring in a list,
tuple, or string, and this happens during program
execution
5) Is Digit ()
- method checks if all characters in a string are digits (0–9).
It returns True if the string is numeric, else False, and this is
evaluated at runtime when the program runs.
6) Is alpha ()
- method checks if all characters in a string are alphabetic
letters (A–Z or a–z). It returns True if the string has only
letters, and False otherwise — and this is checked at runtime
when the program runs.
7) Lower ()
- method returns a copy of the string with all uppercase
letters converted to lowercase, and this transformation
happens at runtime — when the code is executed with actual
data.
8) Upper ()
- method returns a new string where all lowercase letters are converted to
uppercase, and this conversion happens at runtime — based on the actual
input or data during execution.
9) Swap case ()
- method returns a new string where uppercase letters
become lowercase and lowercase letters become
uppercase, and this change happens at runtime — based on
dynamic user input or variable data.
10) Is alnum ()
- method checks if a string contains only alphanumeric
characters that is, letters (A–Z, a–z) and digits (0–9) with
no spaces or special characters. It returns True if all
characters are alphanumeric, and False otherwise. This check
happens at runtime, based on real-time input or data