谈笑有鸿儒网

云计算开发:Python内置函数-dict()函数详解

云计算开发:Python内置函数-dict()函数详解

描述

dict() 函数用于创建一个字典。

语云计法

以下是 dict 方法的语法:

class dic算开t(**kwarg)

class dict(ma发:pping, **kwarg)

class dictPy(iterable, **kwarg)

参数

**thkwargs -- 关键字

mapping -- 元素的容器on。

iterable -- 可迭代对象。

返回值

返内置回一个字典。

实例

以下实例展示了 dict 的使函数用方法:


访客,请您发表评论:

© 2026. sitemap