83 of 151 menu

The lower method

The lower method returns a string in which all characters of the string are in lower case. We do not specify anything in the method parameter.

Syntax

string.lower()

Example

Let's apply the lower method to the following line:

txt = 'AbcDef' print(txt.lower())

Result of code execution:

'abcdef'

Example

Now let's apply the lower method to a string consisting of two words:

txt = 'AbWith DeA' print(txt.lower())

Result of code execution:

'abwith deа'

See also

  • method islower,
    which checks the characters of a string for lowercase
  • method capitalize,
    which changes the first character of a string to uppercase
  • method casefold,
    which returns all unicode characters in lowercase
  • method upper,
    which returns all characters of a string in uppercase
  • method isupper,
    which checks all characters in a string for uppercase
  • method swapcase,
    which changes the case of characters to the opposite
  • method title,
    which changes the first character of each word to uppercase
byenru