Testing whether a number is nearly a multiple of 10
I would suggest you to go further in  hard coding those values:
I mean I would write:

def is_near_ten(num):
   return (num % 10) in [0, 1, 2, 8, 9]


You can see visually the difference (less instructions) and you can confirm that:

&gt;&gt;&gt; import timeit
&gt;&gt;&gt; timeit.timeit('(128 % 10) in [0, 1, 2, 8, 9]')
0.23481132300003082
&gt;&gt;&gt; timeit.timeit('(128 % 10) in range(8, 10) or (128 % 10) in range(0, 3)')
1.3901589560000502


You can notice that further hard coding those values as suggested makes your function more than 5 times faster.