标签:dict pre name type with pts ase 0x03 code
0X01;功能描述
type() 函数如果你只有第一个参数则返回对象的类型,三个参数返回新的类型对象。
0X02;语法:
type(object)
type(name,bases,dict)
0X03;举例:
1 print(type(1)) 2 print(type(‘1‘)) 3 print(type([2]))
#运行结果: C:\Users\aaron\Desktop\Pytoon-cade\venv\Scripts\python.exe C:/Users/aaron/Desktop/Pytoon-cade/urllib-Study.py <class ‘int‘> <class ‘str‘> <class ‘list‘> Process finished with exit code 0
标签:dict pre name type with pts ase 0x03 code
原文地址:https://www.cnblogs.com/aaron456-rgv/p/12132885.html