Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created February 14, 2026 17:57
Show Gist options
  • Select an option

  • Save mypy-play/4e6e78a78b1faf09c539e1eaab45c3e8 to your computer and use it in GitHub Desktop.

Select an option

Save mypy-play/4e6e78a78b1faf09c539e1eaab45c3e8 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
def show_count(count, word):
if count == 1:
return f'1 {word}'
count_str = str(count) if count else 'no'
return f'{count_str} {word}s'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment