4 ms·
Not sure if I can call this as `wat`, but this one puzzled me at first: foo = 1.0 + 2 # Foo is now 3.0 foo = 1,0 + 2 # Foo is now a tuple: (1,2) fo
by avinassh 11y ago
Not sure if I can call this as `wat`, but this one puzzled me at first:
foo = 1.0 + 2 # Foo is now 3.0
foo = 1,0 + 2 # Foo is now a tuple: (1,2)
foo = 3 # Foo is now 3
foo = 3, # Foo is now a tuple: (3,)
source - https://wiki.theory.org/YourLanguageSucks#Python_sucks_because https://wiki.theory.org/YourLanguageSucks#Python_sucks_becau...
- Retra 11y agoThe ',' in always creates a tuple. Why is that puzzling?