





def lowerCamelCase__   (							snake_case_     :  bytes	)				->    str:
   return "".join([hex(snake_case_	)[2:].zfill(2	).upper() for byte in list(snake_case_	)]	)






def lowerCamelCase__   (							snake_case_     :  str	)				->    bytes:
   # Check data validity, following RFC3548
   # https://www.ietf.org/rfc/rfc3548.txt
   if (len(snake_case_	) % 2) != 0:
      raise ValueError(
          '''Base16 encoded data is invalid:
Data does not have an even number of hex digits.'''	)
   # Check the character set - the standard base16 alphabet
   # is uppercase according to RFC3548 section 6
   if not set(snake_case_	) <= set('''0123456789ABCDEF'''	):
      raise ValueError(
          '''Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters.'''	)
   # For every two hexadecimal digits (= a byte), turn it into an integer.
   # Then, string the result together into bytes, and return it.
   return bytes(int(data[i] + data[i + 1]	,				16	) for i in range(0	,				len(snake_case_	)	,				2	)	)


if __name__ == "__main__":
    import doctest

    doctest.testmod()








from __future__ import annotations

import collections
import pprint
from pathlib import Path






def lowerCamelCase__   (							snake_case_     :  str	)				->    str:
   return "".join(sorted(snake_case_	)	)






def lowerCamelCase__   (							snake_case_     :  str	)				->    list[str]:
   return word_by_signature[signature(snake_case_	)]


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

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

if __name__ == "__main__":
    snake_case_           =      {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))

