JPDev to Programmer Humor · 1 year agoThe Perfect Solutionimagemessage-square79fedilinkarrow-up1692arrow-down18
arrow-up1684arrow-down1imageThe Perfect SolutionJPDev to Programmer Humor · 1 year agomessage-square79fedilink
minus-squarerenzev@lemmy.worldlinkfedilinkarrow-up1·11 months agoPython 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
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