Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

difference between iglob() and glob() functions in python

import glob
# path of the current directory
path = './Rough'
htmlfilesusing_glob = glob.glob(path + '/*.html')
print(htmlfilesusing_glob)


htmlfilesusing_iglob = glob.iglob(path + '/*.html')
print(htmlfilesusing_iglob)

# output
# ['./Roughhtml.html', './Roughindex.html']
# <generator object _iglob at 0x0000018A0F54A030>
    Copy Code
Source by www.alixaprodev.com #
 
PREVIOUS NEXT
Tagged: #difference #functions #python
ADD COMMENT
Topic
Name
7+9 =