Python組み込み関数type
len

type組み込み関数

isinstance

オブジェクトの型を返します。

構文

type(object)

使用例

下記の値を入力するとサンプルに即時反映されます。

print
type
class
print(type(42))        # <class 'int'>
print(type(3.14))      # <class 'float'>
print(type("hello"))   # <class 'str'>
print(type([1, 2]))    # <class 'list'>