Wrapping around a list

Amjad Syed amjadcsu at gmail.com
Wed Nov 27 06:07:27 EST 2013


On Wednesday, November 27, 2013 1:53:54 PM UTC+3, Chris Angelico wrote:
> On Wed, Nov 27, 2013 at 9:46 PM,  <amjadcsu at gmail.com> wrote:
> 
> > So the question i am asking , how can i add wrapping around sublist in my sliding window function.
> 
> 
> 
> By the look of what you now have, the easiest way would probably be to
> 
> duplicate the list before you slide. So instead of working on "LEQN",
> 
> you work on "LEQNLEQN" - or possibly "LEQNLEQ", or other shortened
> 
> versions, if it's easier than pulling out the duplicates.
> 
> 
> 
> ChrisA


Thanks Chris for the reply. But i would like sliding function to be scalable, as input string can be of 100 letters.



More information about the Python-list mailing list