9.1 資料型態
Last updated
a=1
b=3
print(a==b)
print(type(a==b))
-
執行結果:
False
<class 'bool'>python = "我愛Python"
print(type(python))
-
執行結果:
<class 'str'>dict = {'name': 'Kevin', 'height': 180, 'weight': 73}
print(dict)
print(dict['name'])
-
執行結果:
{'name': 'Kevin', 'height': 180, 'weight': 73}
Kevin