Data Type
型別
數字的型別有三種:int, float, complex
'This is python'
則是字串型別(str)
試看看以下的程式碼,python shell會幫我們印出不同值的型別。
print(type(1))
print(type(1.0))
print(type(1j))
print(type('abc'))
Last updated
Was this helpful?
數字的型別有三種:int, float, complex
'This is python'
則是字串型別(str)
試看看以下的程式碼,python shell會幫我們印出不同值的型別。
print(type(1))
print(type(1.0))
print(type(1j))
print(type('abc'))
Last updated
Was this helpful?