PyDocs

Nav

Python Language Services

Tuple

ast

class
  • Tuple(elts, ctx)
Tuple(expr* elts, expr_context ctx)
1 Example
>>> print(ast.dump(ast.parse('[1, 2, 3]', mode='eval'), indent=4))
Expression(
    body=List(
        elts=[
            Constant(value=1),
            Constant(value=2),
            Constant(value=3)]))
>>> print(ast.dump(ast.parse('(1, 2, 3)', mode='eval'), indent=4))
Expression(
    body=Tuple(
        elts=[
            Constant(value=1),
            Constant(value=2),
            Constant(value=3)]))
from the Python docs
See Also
No see-alsos for ast/Tuple
0 Notes
No notes for Tuple