Tuple Format?
Gene C
gchiaramonte at yahoo.com
Wed Sep 6 08:09:53 EDT 2000
> The inconsistancy of trailing commas or semicolons (tuple
> operators?) can be solved by requiring them.
>
> one_item_tuple = 1;
> two_item_tuple = 1;2;
>
> Now tuple construction can be explained by saying:
>
> The tuple operator - ';' - concatenates the preceeding
> item into a tuple.
>
> [item] ; [item ; ...]
>
> Is that simple enough?
yes
> Would it work?
no - semicolons are used to delimit statements. pg 14 - Python Essential
Ref
two_item_tuple = 1;2;
is the same as
two_item_tuple = 1;
2;
More information about the Python-list
mailing list