0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pythonの条件の基本

Last updated at Posted at 2024-04-27

あまり知らかったが常識として以下をメモしとく

PythonでのTrue, False

print(1==1 or 2==1) #True
print(1==1 or 2!=1) #True
print(1!=1 or 2==1) #False
print(1!=1 or 2!=1) #True

print(True or False)  #True
print(True or True)   #True
print(False or False) #False
print(False or True)  #True

print(True and False)  #False
print(True and True)   #True
print(False and False) #False
print(False and True)  #False
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?