Post

@PythonPr Answer: 28.2
Two traps in one!
› 2_4 is not a typo. An underscore = readability separator
› 2_4 is 24 (same as 1_000_000 is 1000000)
› x is a tuple (commas): (1, 24, 3.2)
› sum(1, 24, 3.2) = 28.2
For beginners: _ in numbers is just visual spacing for readability.
English

@PythonPr Python ignores underscores between numbers, so the sum is 28.2
English

@PythonPr x = 1, 2_ 4, 3.2
^
SyntaxError: invalid decimal literal
>>>
Dansk







