A special problem is the construction of tuples containing 0 or 1
items: the syntax has some extra quirks to accommodate these. Empty
tuples are constructed by an empty pair of parentheses; a tuple with
one item is constructed by following a value with a comma (it is not
sufficient to enclose a single value in parentheses).
创建只有一个项的元组的正确语法是在该项后面加逗号:
在这个例子中
引用official Python 2 documentation
哪些州(引用)
相关问题 更多 >
编程相关推荐