ウォルラス演算子 作成 2024-07-14 更新 2024-07-14 (810日前) 公開範囲 personal notes Pythonで代入と評価を同時に行える演算子 := if (n := len([1, 2, 3])) > 2: print(f"リストの長さは{n}です")