[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

python, "pakke liste ud"



Hejsa

Jeg har en liste fx

l = [1,[2,3],4, [5,6]]

og vil gerne have det lavet om til:

l = [[1,2,4,5], [1,2,4,6], [1,3,4,5], [1,3,4,6]]

Dvs en liste med en liste for hver kombination af elementer fra sub-lister. Jeg kunne selvfølgelig kode det selv, men jeg har på fornemmelsen at det enten helt eller delvist allerede findes i python.

Desværre kan jeg ikke nogle gode ord for ovenståede at hælde i google, så jeg håber én her kan sige om det findes og i givet fald hvor...

--
peace, love & harmony
Atte

På æsken stod der "use Windows XP or better", så jeg installerede Linux...


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-03-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *