Python Iterators: What does iglob()’s Iterator provide over glob()’s list?

The difference is mentioned in the documentation itself:

Return an iterator which yields the same values as glob() without actually storing them all simultaneously.

Basically list will have all the items in memory. Iterator need not, and hence it requires less memory.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)