Question: Python code 2. Define a function list_directory that takes in a directory name (as a string) as the argument. Your function will change directories to

Python code
2. Define a function list_directory that takes in a directory name (as a string) as the argument. Your function will change directories to the directory name given and return a list of its contents. You may assume that the directory exists and is ocatedinaidethe tolder trom which you sre curenty working How to test: # call inside main() function print Testing list_directoryl'csc111) print 'Expected:['lab1', 'lab2', "lab3', 'lab4, "lab5', "lab6', "lab7, print Actual:', list_directory csc111)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
