Name

() (parentheses)

Examples
a = (4 + 3) * 2         # Grouping expressions
line(a, 0, a, 100)      # Containing a list of parameters
# Writing a tuple literal
colors = ('Red', 'Blue', 'Green')
Description Grouping and containing expressions and parameters. Parentheses have multiple functions relating to functions and structures. They are used to contain a list of parameters passed to functions and control structures and they are used to group expressions to control the order of execution. Some functions have no parameters and in this case, the space between parentheses is blank.

Parentheses are also used to write tuple literals. See the documentation on tuples for more information.
Syntax
function()
function(p1, ..., pN)
(expression)
(tuple_item1, ..., tuple_itemN)
Parameters
functionany function
p1, ..., pNlist of parameters specific to the function
expressionany valid expression
tuple_item1, ..., tuple_itemNa series of comma-separated expressions (to create a tuple)
Related , (comma)
Tuple

Updated on Tue Feb 27 14:07:12 2024.

If you see any errors or have comments, please let us know.