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