check if file exist in directory

Programming

Boston University

Question Description

I see you did a os.walk to check if file exist in the current directory. But what if the file is in a different directory? For example, we took the script out of the addressSearch folder. Instead of doing os.walk, what should i do to check if file exist in the directory "/Users/johnsmith/Desktop/searchAddress "

check if file exist in directory
attachment_1
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!