typeof函数的用法是什么

  • python typeof函数的用法是什么

    在Python中,type()函数用于返回对象的类型。语法如下:type(object)其中,object是要获取类型的对象。示例如下:num = 10print(type(num)) # string = “Hello”print(type(string)) # lst = [1, 2, 3]

    2024-03-11
    0