Additional String Functions

(1) Replace:

(2) Split:

.split() is a function, and without any parameter inside the parenthesis, this functions splits the string near the space.

(3) Check for certain conditions:

  • .isalnum() - Checks if the string is a combination of letters and numbers
  • .isupper() - Checks if all the characters are upper-case
  • .islower() - Checks if all the characters are lower-case
  • .isalpha() - Checks if all the characters are letters
  • .isdigit() - Checks if all the characters are numbers

(4) Convert a string to a title

(5) Joining a string:

(6) Convert a string to either lower or upper cases

Numbers and other special characters are considered neither upper-case nor lower-case.