Python 字典(Dictionary) type()方法
Python 教程
· 2019-02-03 10:27:16
描述
Python 字典(Dictionary) type() 函数返回输入的变量类型,如果变量是字典就返回字典类型。
语法
type()方法语法:
type(dict)
参数
- dict -- 字典。
返回值
返回输入的变量类型。
实例
以下实例展示了 type()函数的使用方法:
#!/usr/bin/python
dict = {'Name': 'Zara', 'Age': 7};
print "Variable Type : %s" % type (dict)
以上实例输出结果为:
Variable Type : <type 'dict'>
点击查看所有 Python 教程 文章: https://www.codercto.com/courses/l/8.html
用户体验草图设计
比尔·巴克斯顿(Bill Buxton) / 黄峰 / 电子工业出版社 / 2009-11 / 168.00元
《用户体验草图设计:正确地设计,设计得正确(全彩)》:比尔·盖茨亲笔推荐版 人因国际、百度、华为、微软、腾讯用户体验部门联合推荐!一起来看看 《用户体验草图设计》 这本书的介绍吧!