Skip to content

Conversation

@eugene-eeo
Copy link

  • Use next(iterable, default) instead of catching exceptions
  • Don't recalculate values:
    • old code: len(text + separator + word)
    • new code only calculates the sum of len(text), len(separator) and len(word)
    • only len(word) is calculated on each iteration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant