def recursive(path):
	"""Move through all files, directories, and subdirectories of a path"""
	yield path
	for name in os.listdir(path):
		fullpath = os.path.join(path, name)
		if os.path.isdir(fullpath):
			for subpath in recursive(fullpath):
				yield subpath
		else:
			yield fullpath
Move through all files, directories, and subdirectories of a path
recipes/Python/577724_Simple_recursive_functinonrecursive/recipe-577724.py