Python のデータ型
Jason Myers
Instructor
TrueFalsePython と他言語を切り替える際は大文字小文字に注意。
out_of_cookies = True
if out_of_cookies:
print("Run to the store NOW!")
Run to the store NOW!
apples=2
if apples:
print("We have apples.")
"We have apples."
apples=0
if apple:
print('We have apples.')
1"Cookies"["Cake", "Pie"]{"key": "value"}0""[]{}Nonecookie_qty == 3
== 等しい!= 等しくない< より小さい<= 以下> より大きい>= 以上x = 0.1 + 1.1
x == 1.2
False
print(x)
1.2000000000000002
浮動小数の等価比較には注意!
Python のデータ型