"""simple docstring"""







from __future__ import annotations
def     __UpperCAmelCase							(       UpperCAmelCase_       :							str    )				->     bool:

	'''simple docstring'''





	__snake_case     :				int
	__snake_case     :				list[str] 						=					list(UpperCAmelCase_    )
	__snake_case						,							__snake_case     :				List[str] 						=					_vector[:-1], int(_vector[-1]    )
	__snake_case     :				list[int] 						=					[int(UpperCAmelCase_    ) for digit in __vector]

	vector.reverse()
	for i, digit in enumerate(UpperCAmelCase_    ):
		if i & 1 == 0:
			__snake_case     :				int 						=					digit * 2
			if doubled > 9:
				doubled -= 9
			check_digit += doubled
		else:
			check_digit += digit

	return check_digit % 10 == 0


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	assert is_luhn("79927398713")
	assert not is_luhn("79927398714")






"""simple docstring"""







_a	:	Optional[Any]=					{
    "+": lambda x, y: x + y,
    "-": lambda x, y: x - y,
    "*": lambda x, y: x * y,
    "/": lambda x, y: x / y,
}
def     __UpperCAmelCase							(       UpperCAmelCase_       :							List[Any]    )				->     List[Any]:

	'''simple docstring'''





	return c.isdigit()
def     __UpperCAmelCase							(       UpperCAmelCase_       :							int    )				->     List[Any]:

	'''simple docstring'''





	__snake_case     :				Dict 						=					[]

	# iterate over the string in reverse order
	for c in expression.split()[::-1]:
		# push operand to stack
		if is_operand(UpperCAmelCase_    ):
			stack.append(int(UpperCAmelCase_    )    )

		else:
			# pop values from stack can calculate the result
			# push the result onto the stack again
			__snake_case     :				Optional[Any] 						=					stack.pop()
			__snake_case     :				int 						=					stack.pop()
			stack.append(calc[c](UpperCAmelCase_     ,				UpperCAmelCase_    )    )

	return stack.pop()


# Driver code
if __name__ == "__main__":
	_a	:	Union[str, Any]=					"+ 9 * 2 6"
	print(evaluate(test_expression))

	_a	:	List[Any]=					"/ * 10 2 + 4 1 "
	print(evaluate(test_expression))





