• Home
  • Explore

[解決!Python]文字列が大文字だけで構成されているか、小文字だけで構成されているかを区別するには(isupperメソッド、islowerメソッド)

atmarkit.itmedia.co.jp/ait/articles/2311/07/news011.html

1 Users

0 Comments

7 Highlights

0 Notes

Tags

Python

Top Highlights

  • isupperメソッド

  • 文字列が大文字(と大文字小文字の区別がない文字)のみで構成されているとTrueを、そうでなければFalseを返す。大文字小文字の区別がない文字のみで構成されている場合にはFalseを返す

  • islowerメソッド

  • 文字列が小文字(と大文字小文字の区別がない文字)のみで構成されているとTrueを、そうでなければFalseを返す。大文字小文字の区別がない文字のみで構成されている場合にはFalseを返す

  • isupperメソッド(とislowerメソッド)はそれらについては大文字小文字の判定には含まない。

  • 文字列に大文字小文字の区別がない文字が含まれていた場合

  • 大文字小文字の区別がない文字だけで文字列が構成されている場合はどうかというと、そのときには以下に示すようにFalseが返される。

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.

AboutPrivacyTerms

© 2023 Glasp Inc. All rights reserved.