Y
Hacker News
new
|
ask
|
show
|
jobs
by
madelfio
4732 days ago
You get a list if you do "object_a = [1, 2, 3]" and a tuple if you do "object_b = (1, 2, 3)". Then try "object_c = 1, 2, 3" and you'll also get the tuple.
1 comments
cben
4728 days ago
You should also mention the 1-item case where the (optional in other cases) trailing comma is required to form a tuple: (1,)
link