For the sake of completion, another thing to note is that list((a,b,c))
will return [a,b,c]
, whereas [(a,b,c)]
will not unpack the tuple. This can be useful when you want to convert a tuple to a list. The reverse works too, tuple([a,b,c])
returns (a,b,c)
.
Edit: As orlp mentions, this works for any iterable, not just tuples.