Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- try:
- f = open("h:\nosuchdirectory\nosuchfile.txt","w") # do not modify this line
- except IOError:
- print('Cannot open, no such directory or file')
- f.write("This is the grape file") # do not modify this line
- f.close() # do not modify this line
- f = open("h:\nosuchdirectory\nosuchfile.txt","w" # do not modify this line
- f.write("This is the grape file") # do not modify this line
- f.close() # do not modify this line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement