Pythonの使うやつ基本
- 2023年11月30日
2023/11 の作業
Pythonの自分でよく使うやつで、使い方をメモ。
Pythonのバージョンは3.9。
● str、int
▼データ存在(str)
# x = 'あいうえお郡ええええ町おおおお村' # 'いう' in x True もっといろいろ検索指定場合は、re.match や re.search
▼判定(int)
# ia = 1 # if ia: # print('ある') ある # ia = 0 # print(not ia) True