def is_variable(var):
	"""Checks if the variable is saved in either local or global variables.

	# uncomment to test
	>>> is_variable('__doc__')
	True

	"""
	return ( var in locals() or var in globals() )