JPDev@programming.dev to Programmer Humor@programming.dev · 10 months agoThe Perfect Solutionprogramming.devimagemessage-square69fedilinkarrow-up1677arrow-down17
arrow-up1670arrow-down1imageThe Perfect Solutionprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 10 months agomessage-square69fedilink
minus-squarerenzev@lemmy.worldlinkfedilinkarrow-up1·10 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