list comprehension question

brobbins333 at shaw.ca brobbins333 at shaw.ca
Sun Aug 11 21:53:21 CEST 2002


Why doesn't this work?

list = [range(2, 12)]
[(x ** 2) + x + 2 for x in list]

error: unsupported operand type for **



More information about the Python-list mailing list