


def lowerCAmelCase__(__snake_case							)    ->				bool:







	'''simple docstring'''







	lowerCamelCase__        =		[list(__snake_case							) for row in matrix]
	if matrix and isinstance(__snake_case	,__snake_case							):
		if isinstance(matrix[0]	,__snake_case							):
			lowerCamelCase__        =		0
			for row in matrix:
				if prev_len == 0:
					lowerCamelCase__        =		len(__snake_case							)
					lowerCamelCase__        =		True
				else:
					lowerCamelCase__        =		prev_len == len(__snake_case							)
		else:
			lowerCamelCase__        =		True
	else:
		lowerCamelCase__        =		False

	return result





def lowerCAmelCase__(__snake_case							)    ->				None:







	'''simple docstring'''







	if check_matrix(__snake_case							) and len(__snake_case							) > 0:
		lowerCamelCase__        =		[list(__snake_case							) for row in a]
		lowerCamelCase__        =		len(__snake_case							)
		if isinstance(a[0]	,__snake_case							):
			lowerCamelCase__        =		len(a[0]							)
		else:
			for dat in a:
				print(__snake_case							)
			return

		# horizotal printing increasing
		for i in range(0	,__snake_case							):
			print(a[0][i]							)
		# vertical printing down
		for i in range(1	,__snake_case							):
			print(a[i][mat_col - 1]							)
		# horizotal printing decreasing
		if mat_row > 1:
			for i in range(mat_col - 2	,-1	,-1							):
				print(a[mat_row - 1][i]							)
        # vertical printing up
		for i in range(mat_row - 2	,0	,-1							):
			print(a[i][0]							)
		lowerCamelCase__        =		[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
		if len(__snake_case							) > 0:
			spiral_print_clockwise(__snake_case							)
		else:
			return
	else:
		print('''Not a valid matrix'''							)
		return





def lowerCAmelCase__(__snake_case							)    ->				list[int]:







	'''simple docstring'''







	if matrix:
		return list(matrix.pop(0							)							) + spiral_traversal(list(zip(*__snake_case							)							)[::-1]							)
	else:
		return []


# driver code
if __name__ == "__main__":
			import doctest

			doctest.testmod()

			_a									=				[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
			spiral_print_clockwise(a)










def lowerCAmelCase__(__snake_case							)    ->				int:







	'''simple docstring'''







	lowerCamelCase__        =		str(__snake_case							).strip()
	if not bin_string:
		raise ValueError('''Empty string was passed to the function'''							)
	lowerCamelCase__        =		bin_string[0] == '''-'''
	if is_negative:
		lowerCamelCase__        =		bin_string[1:]
	if not all(char in '''01''' for char in bin_string							):
		raise ValueError('''Non-binary value was passed to the function'''							)
	lowerCamelCase__        =		0
	for char in bin_string:
		lowerCamelCase__        =		2 * decimal_number + int(__snake_case							)
	return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
			from doctest import testmod

			testmod()



