Is there a way to repeat a tuple inside a tuple ?
If I do something like
a = ((0, 1) * n)
I still get
a = (0, 1, 0, 1 ..... n times)
what if I want something like
a = ((0, 1), (0, 1) ... n times)
Multiply a tuple with a tuple as its item. Don't forget a trailing ,
.
>>> ((0, 1),) * 5
((0, 1), (0, 1), (0, 1), (0, 1), (0, 1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With