3 ms·
All those options are pretty idiomatic. You can also use itertools to write it as `list(it.repeat(1, 10))`. Optionally you can leave out the `list` if you don't
by contravariant 7y ago
All those options are pretty idiomatic. You can also use itertools to write it as `list(it.repeat(1, 10))`. Optionally you can leave out the `list` if you don't need it (which is the main reason to use itertools).