this does not compile:
def isAlphanumeric(self, a):
import re
return re.match(r'^[a-zA-Z0-9]$', a) != None
yet this does:
def isAlphanumeric(self, a):
return len(a) == 1 and a in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
seem we cannot import regex package, is it general that we cannot export any library?