

"""simple docstring"""




A_							:			str											= 0  # The first color of the flag.
A_							:			Optional[int]											= 1  # The second color of the flag.
A_							:			Union[str, Any]											= 2  # The third color of the flag.
A_							:			List[str]											= (red, white, blue)

def 	A       (     snake_case__    ):




			'''simple docstring'''


			if not sequence:
						return []
			if len(snake_case__    ) == 1:
						return list(snake_case__    )
			SCREAMING_SNAKE_CASE__								=      0
			SCREAMING_SNAKE_CASE__								=      len(snake_case__    ) - 1
			SCREAMING_SNAKE_CASE__								=      0
			while mid <= high:
						if sequence[mid] == colors[0]:
									SCREAMING_SNAKE_CASE__							,		SCREAMING_SNAKE_CASE__								=      sequence[mid], sequence[low]
									low += 1
									mid += 1
						elif sequence[mid] == colors[1]:
									mid += 1
						elif sequence[mid] == colors[2]:
									SCREAMING_SNAKE_CASE__							,		SCREAMING_SNAKE_CASE__								=      sequence[high], sequence[mid]
									high -= 1
						else:
									SCREAMING_SNAKE_CASE__								=      f"""The elements inside the sequence must contains only {colors} values"""
									raise ValueError(snake_case__    )
			return sequence


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						A_							:			Any											= input("Enter numbers separated by commas:\n").strip()
						A_							:			Union[str, Any]											= [int(item.strip()) for item in user_input.split(",")]
						print(F'{dutch_national_flag_sort(unsorted)}')





"""simple docstring"""




def 	A       (     snake_case__    ):




			'''simple docstring'''


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

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


if __name__ == "__main__":
						import doctest

						doctest.testmod()


