def fmtdict(dictio: dict, keyval_line=None):
	"""Alternative string representation of a dict, formatted with a new line for every key:val pair,
	and with proper spacing. You can customize how every line is printed by passing a formatted string to
	keyval_line, which accepts two parameters: key, val (e.g. "{key}: {val}") """
	max_keylen = max(len(key) for key in dictio.keys())

	if keyval_line is None:
		keyval_line = "\t{{key:<{maxl}}}\t{{val}}".format(maxl=max_keylen)
		#           = tab | space-padded key up to length of longest key | tab | val
	return "\n".join(keyval_line.format(key=key, val=val) for key, val in dictio.items())