


"""simple docstring"""






def       A_   (   _lowerCAmelCase     :					List[str]       ):






     """simple docstring"""

     if not nums:  # Makes sure that the list is not empty
          raise ValueError('''List is empty'''       )

     _a    	=				sum(__UpperCAmelCase       ) / len(__UpperCAmelCase       )  # Calculate the average
     return sum(abs(x - average       ) for x in nums       ) / len(__UpperCAmelCase       )


if __name__ == "__main__":
   import doctest

   doctest.testmod()



"""simple docstring"""






from pathlib import Path

import fire
def       A_   (   _lowerCAmelCase     :					str,     _lowerCAmelCase     :					str,     _lowerCAmelCase     :					int       ):






     """simple docstring"""

     _a    	=				Path(_lowerCAmelCase       )
     _a    	=				Path(_lowerCAmelCase       )
     dest_dir.mkdir(exist_ok=_lowerCAmelCase       )
     for path in src_dir.iterdir():
          _a    	=				[x.rstrip() for x in list(path.open().readlines()       )][:n]
          _a    	=				dest_dir.joinpath(path.name       )
          print(_lowerCAmelCase       )
          dest_path.open('''w'''       ).write('''\n'''.join(_lowerCAmelCase       )       )


if __name__ == "__main__":
   fire.Fire(minify)