


"""simple docstring"""





from __future__ import annotations

import collections
import pprint
from pathlib import Path


def      _snake_case						(						_snake_case				:			str			):
      return "".join(sorted(_snake_case			)			)


def      _snake_case						(						_snake_case				:			str			):
      return word_by_signature[signature(_snake_case			)]


snake_case__		:     str    				=				Path(__file__).parent.joinpath('''words.txt''').read_text(encoding='''utf-8''')
snake_case__		:     Any    				=				sorted({word.strip().lower() for word in data.splitlines()})

snake_case__		:     List[Any]    				=				collections.defaultdict(list)
for word in word_list:
 word_by_signature[signature(word)].append(word)

if __name__ == "__main__":
 snake_case__		:     Optional[int]    				=				{word: anagram(word) for word in word_list if len(anagram(word)) > 1}

 with open('''anagrams.txt''', '''w''') as file:
  file.write('''all_anagrams = \n ''')
  file.write(pprint.pformat(all_anagrams))






"""simple docstring"""





def      _snake_case						(						_snake_case				:			int ,   _snake_case				:			int			):
      return base * power(_snake_case ,   (exponent - 1)			) if exponent else 1


if __name__ == "__main__":
 print('''Raise base to the power of exponent using recursion...''')
 snake_case__		:     Union[str, Any]    				=				int(input('''Enter the base: ''').strip())
 snake_case__		:     Optional[Any]    				=				int(input('''Enter the exponent: ''').strip())
 snake_case__		:     Any    				=				power(base, abs(exponent))
 if exponent < 0:  # power() does not properly deal w/ negative exponents
  snake_case__		:     Dict    				=				1 / result
 print(f"""{base} to the power of {exponent} is {result}""")


