使い方
type1 = type( obj )
渡したobjのtypeを返します
str1 = 'abc'
type1 = type( str1 )
print(type1)
#結果 <class 'str'>__class__
str1 = 'abc'
type1 = str1.__class__
print(type1)
#結果 <class 'str'>objに.__class__を付与することで同様の結果を取得できます
組み込み関数type1 = type( obj )
渡したobjのtypeを返します
str1 = 'abc'
type1 = type( str1 )
print(type1)
#結果 <class 'str'>str1 = 'abc'
type1 = str1.__class__
print(type1)
#結果 <class 'str'>objに.__class__を付与することで同様の結果を取得できます