On Wed, Mar 23, 2016, at 12:08, Mark Lawrence wrote:
> > And doing it 'Pythonically' can lead to suggestions such as the
> > following the other day:
> >
> >   c, psource = psource[0], psource[1:]
> >
> > (where psource is a very long string), which even I could tell, from
> > knowing what goes on behind the scenes, wasn't going to work well
> > (duplicating the rest of the string roughly every other character).
> >
> 
> It would work perfectly. How would it duplicate the rest of the string 
> roughly every other character?

Er, I think he's suggesting that this would be in an inner loop
(something like while psource: c, psource = psource[0], psource[1:]).
What I'm not sure of is why he thinks this is pythonic.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to