assert os.path.exists(user_input), 'I did not find the file at, ' + str(
    user_input)
f = open(user_input, 'r+')
print('Hooray we found your file!')
f.close()
What is the proper way to take take a directory path as user input?