Re: Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-21 Thread dn via Python-list
On 22/05/24 07:14, HenHanna via Python-list wrote: How can i write this function Cprod (Cartesian Product) simply?     (writing this out: itertools.product([0, 1], repeat=N ) The value can be a list or a Tuple.     cprod([0, 1], 1) => ((0) (1))    

Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-21 Thread HenHanna via Python-list
How can i write this function Cprod (Cartesian Product) simply? (writing this out: itertools.product([0, 1], repeat=N ) The value can be a list or a Tuple. cprod([0, 1], 1) => ((0) (1)) cprod([0, 1], 2) => ((0,0) (0,1) (1,0) (1,1)) This

Re: pip and venvs on Debian

2024-05-21 Thread Roel Schroeven via Python-list
Op 20/05/2024 om 23:48 schreef Akkana Peck via Python-list: Every so often I need to regenerate it (like when Debian updates the system Python version) but that's easy to do: I don't try to duplicate what's installed there, I just delete the old venv, create a new one and then pip install