Skip to content

Instantly share code, notes, and snippets.

@Mishco
Last active June 13, 2022 18:10
Show Gist options
  • Select an option

  • Save Mishco/61c735324a2bb29009fbc839e00f19dd to your computer and use it in GitHub Desktop.

Select an option

Save Mishco/61c735324a2bb29009fbc839e00f19dd to your computer and use it in GitHub Desktop.
import re
WORD_PATTERN = "[a-z-A-Z]*"
selected_words = []
for word in input_lines
if len(word) > 1 and re.match(WORD_PATTERN, word).endpos > 0:
selected_words.append(word)
unique_count = len(selected_words.items())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment