What is the missing number (divisibility by 9) Challenge

Given a whole number divisible by 9 and one missing digit, find the missing digit.

The missing digit may be represented by any character other than the digits 0-9 as long as it is consistent.

If the missing digit could be 0 or 9, output something to signify so.

Assume the user is intelligent enough to put only one missing digit and one number etc.

Test Cases

In the test cases the missing digit is represented by a question mark

123? -&gt; 3
?999 -&gt; 0 or 9
?0023 -&gt; 4
000?1 -&gt; 8
Python, 21 bytes



lambda s:-int(s,19)%9


Try it online!

I used I to represent a missing digit.