def verify_isbn(isbn): count = 10 isbn_numbers = 0 for num in isbn: if num != '-' and count >= 2: first_result = int(num) * count isbn_numbers = isbn_numbers + first_result count -= 1 new_result = isbn_numbers % 11 new_result = 11 - new_result final_result = new_result % 11 print final_result #this prints ok print isbn[-1] #this is where my problem is