nested for loop

Wolfgang Buechel wjb131 at web.de
Sun May 23 04:28:24 EDT 2004


wjb131 at web.de (Wolfgang Buechel) wrote in message news:<4629559b.0405101330.286ddb32 at posting.google.com>...
> Hi,
> 
> I want to iterate over all 2x2 matrices with elements in range 0..25 
> (crypto-stuff). 

Try generators (new in Python 2.3.3).
There is an example you can/must adapt:
Look at your Python installation:
 
(PythonPath)/Lib/test/test_generators.py
def conjoin()
  
and in the whatsnew-documentation:

http://www.python.org/doc/2.3.3/whatsnew/section-generators.html

--W.



More information about the Python-list mailing list