[解決!Python]if文にand/or演算子を使って複数の条件を記述するには
[解決!Python]if文にand/or演算子を使って複数の条件を記述するには:解決!Python # 複数の条件が全て成立するかどうかをチェック:and演算子 a = 'foo' b = 'bar' if a == 'bar' and b == 'foo': # False and False == False print('bar foo') elif a == 'bar' and b == 'bar': # False and True == False print…
もっと詳しく
![[解決!Python]if文にand/or演算子を使って複数の条件を記述するには [解決!Python]if文にand/or演算子を使って複数の条件を記述するには](https://cdn-ak-scissors.b.st-hatena.com/image/square/26587f1224162a13ada45c7a4a18001e4530b76e/height=90;version=1;width=120/https%3A%2F%2Fimage.itmedia.co.jp%2Fait%2Farticles%2F2205%2F17%2Fcover_news023.png)
