python3 一切皆對象

一切皆對象: 全部基本類型內部均由對象實現。 一個整數是一個對象, 一個字符串也是一個對象: >>> a='1' >>> print(type(a)) <class 'str'> >>> a=1 >>> print(type(a)) <class 'int'> python 中類型也是一種對象,稱爲類型對象 >>> print(type(str)) <class 'type'> >>> p
相關文章
相關標籤/搜索