Wrapping around a list
Amjad Syed
amjadcsu at gmail.com
Wed Nov 27 13:14:52 EST 2013
On Wednesday, November 27, 2013 2:14:18 PM UTC+3, Chris Angelico wrote:
> On Wed, Nov 27, 2013 at 10:07 PM, Amjad Syed <amjadcsu at gmail.com> wrote:
>
> > Thanks Chris for the reply. But i would like sliding function to be scalable, as input string can be of 100 letters.
>
>
>
> A hundred isn't much to work with, and your code will be fairly
>
> simple. Give it a try with small strings, see how it goes; then try it
>
> on your full-size - I doubt there'll be a problem.
>
>
>
> Now, if you were talking about a hundred million letters, then maybe
>
> there'd be a problem. But even there, I'd start with the simple and
>
> clean approach, and only optimize for performance when it becomes
>
> obviously necessary (like when my MUD client was able to saturate one
>
> core of my CPU, just by me typing a lot of commands very rapidly -
>
> that needed fixing!).
>
>
>
> ChrisA
Thanks Chris, the duplication did solve the problem.
More information about the Python-list
mailing list