90 of 151 menu

The isupper method

The isupper method checks all characters in a string for uppercase. Nothing is passed to the method parameters. The method returns the Boolean values ​​True or False.

Syntax

string.isupper()

Example

Let's check all characters in a string for uppercase:

txt = 'ABCDEF' print(txt.isupper())

Result of code execution:

True

Example

Now let's say there are other symbols in the line:

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

Result of code execution:

False

See also

  • method istitle,
    which checks the first character of a word for uppercase
  • method islower,
    which checks the characters of a string for lowercase
  • method title,
    which changes the first character of each word to uppercase
  • method upper,
    which returns all characters of a string in uppercase
  • method swapcase,
    which changes the case of characters to the opposite
  • method lower,
    which returns all lowercase ASCII characters
  • method capitalize,
    which changes the first character of a string to uppercase
  • method casefold,
    which returns all unicode characters in lowercase
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline