Splitting of string at an interval

Chris Angelico rosuav at gmail.com
Mon Apr 8 12:20:17 EDT 2013


On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith <roy at panix.com> wrote:
> I can't help point out, however, that if your initial implementation is to have your code return a constant, it's pretty likely to be an optimum solution in both time and space :-)

Likely, but not certain.

# 1
def fifty_stars():
  return "**************************************************"

# 2
fifty_stars=lambda "*"*50

Okay, that's just getting 2AM stupid now. :)

ChrisA



More information about the Python-list mailing list