• renzev@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    10 months 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