def range_parse(rng):
    min, max = rng.split('-')
return ''.join(chr(i) for i in range(ord(min), ord(max) + 1))
print(range_parse('a-z') + range_parse('A-Z'))
Generate random string from regex character set