On Thu, 12 Aug 2021 09:57:33 +0100, Stephen Tucker <[email protected]>
declaimed the following:
>
># Logic Effect
>
>#
>
># [None * 8] TypeError: unsupported operand type(s) for *: ...
>
># [(None) * 8] TypeError: unsupported operand type(s) for *: ...
>
># [((None)) * 8] TypeError: unsupported operand type(s) for *: ...
>
># [(None,) * 8] [(None, None, None, None, None, None, None, None)]
>
># list ((None) * 8) TypeError: unsupported operand type(s) for *: ...
>
In all the above, you've put the *8 INSIDE the list structure. You
"working" example is actually creating a TUPLE stored (as the only element)
inside a LIST.
>>> [None] * 8
[None, None, None, None, None, None, None, None]
>>>
Creates a LIST of 8 elements, each being None.
--
Wulfraed Dennis Lee Bieber AF6VN
[email protected] http://wlfraed.microdiversity.freeddns.org/
--
https://mail.python.org/mailman/listinfo/python-list