JPDev@programming.dev to Programmer Humor@programming.dev · 2 年前The Perfect Solutionprogramming.devimagemessage-square79linkfedilinkarrow-up1693arrow-down18
arrow-up1685arrow-down1imageThe Perfect Solutionprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 2 年前message-square79linkfedilink
minus-squarerenzev@lemmy.worldlinkfedilinkarrow-up1·2 年前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
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