islower() 関数を使う。
例
print('abcde'.islower())
print('abcDe'.islower())
結果
True
False
雑記
投稿日:
islower() 関数を使う。
print('abcde'.islower())
print('abcDe'.islower())
True
False
執筆者:seyanen
関連記事
matplotlib で、x,y の軸上の数値を表示する方法
ax の xtics と ytics を使って表示する。 詳細は次のドキュメントを参照。 https://matplotlib.org/stable/gallery/lines_bars_and_ma …
python3 で csv ファイルを読み込んで、最初の数行を表示する方法
以下の例では、空の配列 data を用意しておき、最初の3行を読み込んでおく。 例 import csv with open(‘data.csv’,’r’) as csv_file: csv_read …
axhline, axvline を使ってx,y軸に平行な線を描くことができる。 https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot …
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。
next() を使う。 例 my_arr = [‘春’,’夏’,’秋’,’冬’] my_iter = iter(my_arr) print(next(my_iter,’なし’)) print(next …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。