

'''simple docstring'''

from __future__ import annotations

def 					__UpperCamelCase				(						lowercase__    :	list[int | str]			):






     '''simple docstring'''





     create_state_space_tree(lowercase__,       [],       0,       [0 for i in range(len(lowercase__			)			)]			)

def 					__UpperCamelCase				(						lowercase__    :	list[int | str],       lowercase__    :	list[int | str],       lowercase__    :	int,       lowercase__    :	list[int],       ):






     '''simple docstring'''





     if index == len(lowercase__			):
          print(lowercase__			)
          return

     for i in range(len(lowercase__			)			):
          if not index_used[i]:
               current_sequence.append(sequence[i]			)
               __lowercase      		=True
               create_state_space_tree(lowercase__,       lowercase__,       index + 1,       lowercase__			)
               current_sequence.pop()
               __lowercase      		=False
UpperCAmelCase					 =	[3, 1, 2, 4]
generate_all_permutations(sequence)

UpperCAmelCase					 =	["A", "B", "C"]







generate_all_permutations(sequence_a)





'''simple docstring'''

def 					__UpperCamelCase				(						lowercase__    :	list[int]			):






     '''simple docstring'''





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

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


if __name__ == "__main__":
       import doctest

       doctest.testmod()


