9 lines
193 B
Python
9 lines
193 B
Python
filename = "alice.txt"
|
|
|
|
try:
|
|
with open(filename) as file:
|
|
contents = file.read()
|
|
except FileNotFoundError:
|
|
msg = "sorry, the file" + filename + " does not exist"
|
|
print(msg)
|