Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Homework # # Use the os . listdir function to retrieve a list # of files and display them on the screen with # a
Homework
#
# Use the oslistdir function to retrieve a list
# of files and display them on the screen with
# a for loop.
#
# Then, with another for loop, display only the
# py files, if any.
#
# If there are no files in your current working
# directory so nothing shows in your output, modify
# your code use chdir near the at the beginning
# of the script to change into a directory that
# does have files.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started