【发布时间】:2012-09-28 13:06:18
【问题描述】:
众所周知,
{} # Represents a dict
和
{'one': 1} # Again a dict
这是一个集合的方式和原因:
{'one', 'two', 'three', 'four'} # I thought it should give syntax error
但它给出了:
set(['one', 'two', 'three', 'four']) # Strange ?? [ Should this happen ? ]
您能否提供一些讨论相同问题的官方文档的链接?
【问题讨论】:
-
亲爱的投反对票的人,投反对票没有冒犯。只需添加评论,这有什么遗漏/错误?
-
任何人都可以知道python中的任何其他有线/冲突语法吗?
标签: python list syntax dictionary set