Greetings: Andrei gave me the answer I needed: <<snip>> >Let's fix that by extending the list instead: > > retList.extend([word[pos] + item for item in permuteList]) > <<snip>>
The extend method solved the problem. Barry >-----Original Message----- >From: Carroll, Barry >Sent: Friday, October 28, 2005 5:49 PM >To: 'Alan Gauld'; Carroll, Barry; tutor@python.org >Subject: RE: [Tutor] Recursion and List Comprehensions > >Alan et al: > >After reading the topic you recommended I tried rewriting my permute >function as follows: > <<snip>> _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor