





def _a					(  SCREAMING_SNAKE_CASE__			:  str   )       ->				str:

							'''simple docstring'''






							SCREAMING_SNAKE_CASE__   :			Tuple      =						word.upper()
							SCREAMING_SNAKE_CASE__   :			Union[str, Any]      =						0
							SCREAMING_SNAKE_CASE__   :			Optional[Any]      =						{}
							SCREAMING_SNAKE_CASE__   :			List[Any]      =						[]

							for letter in word:
														if letter not in letter_nums:
																					SCREAMING_SNAKE_CASE__   :			Tuple      =						str(SCREAMING_SNAKE_CASE__   )
																					next_num += 1
														word_pattern.append(letter_nums[letter]   )
							return ".".join(SCREAMING_SNAKE_CASE__   )


if __name__ == "__main__":
		import pprint
		import time

		_lowerCamelCase					:				Optional[Any]  							=					time.time()
		with open('''dictionary.txt''') as in_file:
				_lowerCamelCase					:				Optional[int]  							=					in_file.read().splitlines()

		_lowerCamelCase					:				dict  							=					{}
		for word in word_list:
				_lowerCamelCase					:				int  							=					get_word_pattern(word)
				if pattern in all_patterns:
						all_patterns[pattern].append(word)
				else:
						_lowerCamelCase					:				Any  							=					[word]

		with open('''word_patterns.txt''', '''w''') as out_file:
				out_file.write(pprint.pformat(all_patterns))

		_lowerCamelCase					:				Union[str, Any]  							=					round(time.time() - start_time, 2)
		print(f"Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.")
		# Done!  9,581 word patterns found in 0.58 seconds.














"""simple docstring"""



from doctest import testmod
from math import sqrt


def      SCREAMING_SNAKE_CASE__    (   snake_case    :      int							)->						list:






     '''simple docstring'''



     UpperCAmelCase__		:  list[int]				=				[]
     if num < 1:
          return facs
     facs.append(1							)
     if num == 1:
          return facs
     facs.append(snake_case							)
     for i in range(2       , int(sqrt(snake_case							)							) + 1							):
          if num % i == 0:  # If i is a factor of num
               facs.append(snake_case							)
               UpperCAmelCase__		:  Any				=				num // i  # num//i is the other factor of num
               if d != i:  # If d and i are distinct
                    facs.append(snake_case							)  # we have found another factor
     facs.sort()
     return facs


if __name__ == "__main__":
 testmod(name="""factors_of_a_number""", verbose=True)


