Posts

Showing posts with the label operator-precedence

Why does Python return [15] for [0xfor x in (1, 2, 3)]? [duplicate]

59 13 This question already has answers here : In python, why does 0xbin() return False? [duplicate] (4 answers) Closed 15 days ago . When running the following line: >>> [0xfor x in (1, 2, 3)] I expected Python to return an error. Instead, the REPL returns: [15] What can possibly be the reason? python ...