D
int('٤٢')
# 42
'٤٢'.isdigit()
# True
import re
re.compile('\d+').match('٤٢')
# <re.Match object; span=(0, 2), match='٤٢'>
If you want to match only Arabic numerals, make an explicit check for it:
n = '٤٢'
n.isdigit() and n.isascii()
# False
re.compile('[0-9]+').match(n)
# None
Let's make the full list of supported numerals:
from collections import defaultdict
nums = defaultdict(str)
for i in range(0x110000):
try:
int(chr(i))
except:
pass
else:
nums[int(chr(i))] += chr(i)
dict(nums)