Re: Python syntax error...not sure why?

Posted 08 July 2013 - 11:04 AM

No, he means an octal integer literal containing the digit 9 (or, for that matter, 8) is an invalid token as octal numbers can't contain those digits. Writing 017 would be fine (and behave the same way as writing 15), but 09 is illegal because that's not a valid number in base 8.

PS: Using the comma like that creates a tuple, not a list (a list would have square brackets around it - not round ones). And yes, tuples (as well as lists) can contain values of different types.