描述
dict() 函数用于创建一个字典。
语法
以下是 dict 方法的语法:
class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)
参数
**kwargs -- 关键字
mapping -- 元素的容器。
iterable -- 可迭代对象。
返回值
返回一个字典。
实例
以下实例展示了 dict 的使用方法:
描述
dict() 函数用于创建一个字典。
语法
以下是 dict 方法的语法:
class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)
参数
**kwargs -- 关键字
mapping -- 元素的容器。
iterable -- 可迭代对象。
返回值
返回一个字典。
实例
以下实例展示了 dict 的使用方法:
0评论2024-12-04789
0评论2024-11-28
0评论2023-12-26
0评论2023-11-03
0评论2023-10-26
0评论2023-08-14
0评论2023-08-11
0评论2023-06-13
0评论2023-05-22