Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60594
| References | <35a56651-33b3-454e-a936-439196989d3b@googlegroups.com> <mailman.3288.1385549643.18130.python-list@python.org> <f01581f8-25b8-4217-aec6-2b93fcc12cbb@googlegroups.com> |
|---|---|
| Date | 2013-11-27 22:14 +1100 |
| Subject | Re: Wrapping around a list |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3289.1385550867.18130.python-list@python.org> (permalink) |
On Wed, Nov 27, 2013 at 10:07 PM, Amjad Syed <amjadcsu@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Wrapping around a list amjadcsu@gmail.com - 2013-11-27 02:46 -0800
Re: Wrapping around a list Chris Angelico <rosuav@gmail.com> - 2013-11-27 21:53 +1100
Re: Wrapping around a list Amjad Syed <amjadcsu@gmail.com> - 2013-11-27 03:07 -0800
Re: Wrapping around a list Chris Angelico <rosuav@gmail.com> - 2013-11-27 22:14 +1100
Re: Wrapping around a list Amjad Syed <amjadcsu@gmail.com> - 2013-11-27 10:14 -0800
Re: Wrapping around a list Ned Batchelder <ned@nedbatchelder.com> - 2013-11-27 06:26 -0500
Re: Wrapping around a list Neil Cerutti <mr.cerutti@gmail.com> - 2013-11-27 08:33 -0500
Re: Wrapping around a list Peter Pearson <ppearson@nowhere.invalid> - 2013-11-27 17:42 +0000
Re: Wrapping around a list rusi <rustompmody@gmail.com> - 2013-11-27 08:12 -0800
csiph-web