Skip to content Skip to sidebar Skip to footer
Showing posts with the label Iterable Unpacking

How To Define A Tuple Of Randint Without Repeating Code?

I often get to use tuples of randint for color-values and such like (a, b, c) = randint(0, 255), ra… Read more How To Define A Tuple Of Randint Without Repeating Code?

Unpacking Generalizations

PEP 448 -- Additional Unpacking Generalizations allowed: >>> LOL = [[1, 2], ['three… Read more Unpacking Generalizations

Safe Unpack Empty Tuple Array

The line import re; print(re.findall('(.*) (.*)', 'john smith')) outputs [('joh… Read more Safe Unpack Empty Tuple Array

Safe Unpack Empty Tuple Array

The line import re; print(re.findall('(.*) (.*)', 'john smith')) outputs [('joh… Read more Safe Unpack Empty Tuple Array