def _list_to_regex_component(l, max_ambiguity = 3):
	""" 
	list of str to regex 

	Parameters
	----------

	l : list
		list of strings
	max_ambiguity : int
		default is 3, more than max results in '.' rather than a set []
	
	Example
	-------
	>>> _list_to_regex_component(['A'])
	'A'
	>>> _list_to_regex_component(['A','T','C'])
	'[ATC]'
	>>> _list_to_regex_component(['A','T','C','G'])
	'.'
	>>> _list_to_regex_component(['A','-','C'])
	'[AC]?'
	"""
	if len(l) < 1:
		s = '.?'
	elif len(l) < 2:
		s = l[0]
	elif len(l) <= max_ambiguity:
		s = f"[{''.join(l)}]"
	else:
		s = '.'
	
	if s == '-':
		s = s.replace('-', '.?') 
	elif s.find('-') != -1:
		s = s.replace('-', '') 
		s = f"{s}?"
	return s