you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 years ago

Python is so great (half-sarcasm) that a trailing comma on its own constitutes a tuple (immutable list):

mytuple = 4,
assert len(mytuple) == 1
assert mytuple[0] == 4
  • source
  • parent