def isbn13_checksum (isbn_str):
	"""
	Return the checksum over the coding (first 12 digits) of an ISBN-13.

	:Parameters:
		isbn_str : string
			An ISBN-13 without the trailing checksum digit.

	:Returns:
		The checksum character, ``0`` to ``9``.

	For example:

		>>> isbn13_checksum ("978094001673")
		'6'
		>>> isbn13_checksum ("979123456789")
		'6'

	"""
	## Preconditions & preparation:
	assert (len (isbn_str) == 12), 'expecting a 12-digit string'
	## Main:
	csum = 0
	for i in range (0, len (isbn_str), 2):
		csum += int (isbn_str[i]) + (3 * int (isbn_str[i+1]))
	cdigit = 10 - (csum % 10)
	if (cdigit == 10):
		cdigit = 0
	## Return:
	return str (cdigit)