Language Syntax
Tuple display — Python syntax
A comma generally makes a tuple; parentheses group expressions and are required for the empty tuple. The single-item form needs a trailing comma. Tuple immutability does not make contained mutable objects immutable.
Formal Syntax & Structure
python syntaxpython
(expression, ...)Return Value
tuple
Value obtained by evaluating this expression; see description for context and constraints.
Working Example
Example Snippetpython
a=(7)b=(7,)print((type(a).__name__,type(b).__name__,len(b)))