Let's say you want to create a generator yielding the names of all csv files in my_dir and print them. Put the lines of code in the correct order. Don't forget about the indentation.
Glob module
A generator
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
generator = glob.iglob("my_dir\\*.csv")
import glob
for item in generator:
print(item)
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.