Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
madelfio
· 13y ago · 0 comments
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.
Comments
[–]
cben
13y ago
You should also mention the 1-item case where the (optional in other cases) trailing comma is required to form a tuple: (1,)