Generator is a special type of function which returns an iterator object with a sequence of values. Iterator saves resources. Only one element is stored in the memory at a time. unlike list or tuple where all the values are stored at once.
#python #generator #iterator #pythonforbeginners #pythontutorial