def get_readable_list(passed_list, sep=', ', end=''):
	output = ""
	if isinstance(passed_list, list) or isinstance(passed_list, tuple):
		for i, item in enumerate(passed_list):
			if len(passed_list) is 1:
				output += str(item)

			else:
				if i is not (len(passed_list) - 1):
					output += str(item) + sep
				else:
					output += str(item)


	elif isinstance(passed_list, dict):
		for i, item in enumerate(passed_list.values()):
			if len(passed_list) is 1:
				output += str(item)

			else:
				if i is not (len(passed_list) - 1):
					output += str(item) + sep
				else:
					output += str(item)

	return output + end


def get_list_as_english(passed_list):
	output = ""
	for i, item in enumerate(passed_list):
		if len(passed_list) is 1:
			output += str(item) + ' '

		elif len(passed_list) is 2:
			output += str(item)
			if i is not (len(passed_list) - 1):
				output += " and "
			else:
				output += ""

		else:
			if i is not (len(passed_list) - 1):
				output += str(item) + ", "
			else:
				output += "and " + str(item) + ", "
	return output

@@ -1053,8 +1053,732 @@
  output%0A
+%0Adef tidy_float(s):%0A%09# taken from http://stackoverflow.com/questions/5807952/removing-trailing-zeros-in-python%0A%09%22%22%22Return tidied float representation.%0A%09Remove superflous leading/trailing zero digits.%0A%09Remove '.' if value is an integer.%0A%09Return '****' if float(s) fails.%0A%09%22%22%22%0A%09# float?%0A%09try:%0A%09%09f = float(s)%0A%09except ValueError:%0A%09%09return '****'%0A%09# int?%0A%09try:%0A%09%09i = int(s)%0A%09%09return str(i)%0A%09except ValueError:%0A%09%09pass%0A%09# scientific notation?%0A%09if 'e' in s or 'E' in s:%0A%09%09t = s.lstrip('0')%0A%09%09if t.startswith('.'): t = '0' + t%0A%09%09return t%0A%09# float with integral value (includes zero)?%0A%09i = int(f)%0A%09if i == f:%0A%09%09return str(i)%0A%09assert '.' in s%0A%09t = s.strip('0')%0A%09if t.startswith('.'): t = '0' + t%0A%09if t.endswith('.'): t += '0'%0A%09return t

Add a function to remove trailing zeros from numbers